Excel Border Shortcut: Apply All or Outline Borders

How-to basics · Updated November 2, 2026

Excel Border Shortcut: Apply All or Outline Borders

In Excel for Microsoft 365 on Windows, select the cells and press Ctrl+Shift+& to apply an outline border. To put borders around every cell in the selection, press Alt, then H, B, and A in sequence; this opens the Borders menu and chooses All Borders.

The quickest Excel border shortcuts

The right shortcut depends on what you mean by “add a border.” Excel distinguishes an outside outline around a selected range from borders around each individual cell. Those actions look different, so choose the one that matches the layout you want.

  • Outline border: Select one or more cells, then press Ctrl+Shift+&. Excel draws a border around the outside edge of the selection.
  • All Borders: Select the range, then press Alt, H, B, A one key at a time. This adds borders around the outside and between the cells in the selection.
  • Remove outline border: Press Ctrl+Shift+_ to remove the outline border from the selected cells. This shortcut is not the same as clearing every border inside a range.

For example, select B2:D5 and use Ctrl+Shift+& to frame the whole block. Use Alt, H, B, A instead if you want a visible box around every cell, including the internal divisions between B, C, and D and between rows 2 through 5.

How the Alt key sequence works

On Windows, the Alt sequence follows Excel’s ribbon KeyTips. Press and release Alt to show the available letter hints, then follow the hints for the Home tab and Borders menu. In the standard English Microsoft 365 ribbon, the sequence is Alt, H, B, A: H selects Home, B opens the Borders menu, and A chooses All Borders. Type each key in order rather than holding Alt while typing the whole sequence.

KeyTips can differ if the Office display language, ribbon layout, or version differs. If the letters shown on screen do not match, follow the displayed hints instead of forcing the sequence. You can also reach the same command with the mouse through Home > Font > Borders, then choose All Borders. The Borders button is the small square-style icon in the Font group; its displayed icon can change to reflect the last border command used.

Outline border versus All Borders

An outline border surrounds the outside of the selected area, without adding lines between cells. It is useful for emphasizing a total, enclosing a small summary, or separating a report block from nearby content. All Borders adds both the outside edge and the internal cell lines, which is often useful for a compact table that needs clear row and column boundaries.

Excel also offers commands such as Outside Borders, Bottom Border, Top Border, Left Border, and Right Border in the Borders menu. These let you apply a specific edge without changing the others. The exact menu choices are worth using when formatting a heading row or separating a subtotal: a bottom border below the heading, for example, avoids drawing a box around every heading cell.

Do not assume that a border shortcut always toggles a border on and off. Applying a border command sets the selected border style; repeating a command may not reverse the result. To remove a particular edge or clear all edges, use the Borders menu’s removal command rather than pressing the apply shortcut again.

Select the right cells before applying a border

Border commands act on the current selection. A selection can be one cell, a rectangular range, several nonadjacent cells, or an entire row or column. The result follows the shape of the selected cells, so checking the selection first prevents a border from extending farther than intended.

  • Click one cell to frame that cell alone.
  • Drag across a rectangular block, or click the first cell and Shift-click the last, to format a range.
  • Use the row numbers or column letters to select a whole row or column before applying a border.
  • To select separate areas, hold Ctrl while selecting additional ranges on Windows, then apply the command to the selection.

For a table-like range, select only the populated cells if you do not want borders to continue into blank rows or columns. If you are formatting a whole column, remember that borders can affect a very large number of cells and may make the worksheet appear busy. Applying borders to a defined data range is usually easier to manage.

Border styles, colors, and custom edges

The keyboard shortcuts apply the current default border style; they are not a complete substitute for the formatting controls. To choose a line color, weight, or style, open Home > Font > Borders > More Borders. In the Format Cells dialog, use the Border tab to choose a line style and color, then click the edges in the preview that you want to apply. The preview helps distinguish outside edges from internal horizontal or vertical lines.

A practical sequence is to select the range, choose the desired line style or color in the Border tab, and apply the required edges there. For a simple outline, choose the style and click the outline in the preview. For a grid, choose the style and apply both the outline and internal lines. When you later use a quick border shortcut, do not assume it will use a special style selected for another range; check the resulting formatting if consistency is important.

For repeatable formatting across a workbook, consider using Format Painter or copying a correctly formatted range and using Paste Special for formats. These approaches can transfer more than borders, so inspect the result: formatting can include number formats, fills, fonts, and alignment as well as borders.

Borders are different from worksheet gridlines

A frequent source of confusion is the faint grid visible across an ordinary worksheet. Those are gridlines, a worksheet display aid, not cell borders. Gridlines are generally visible in the worksheet view but are not printed by default. Borders are cell formatting: they can be colored or styled and normally print with the worksheet when the relevant cells are included in the print area.

If a table looks lined on screen but the lines disappear in a printout, you may be seeing gridlines rather than borders. To add printable lines, select the cells and apply borders. To change whether gridlines appear on screen, use View > Show > Gridlines. Print settings for gridlines are separate; on Windows, the Page Layout tab includes a Gridlines option in the Sheet Options group for printing. Adding borders is usually the more precise choice for a report because you can control exactly which edges appear.

Using border shortcuts on Mac and Excel for the web

The Alt-based KeyTip sequence described above is for Excel on Windows. Ribbon keyboard navigation differs on Mac, and the same Alt, H, B, A sequence should not be assumed to work there. In Excel for Mac, use Home > Borders and choose the needed border command from the menu. The outline-border shortcut is commonly Command+Option+0 in Excel for Mac, though keyboard layouts and macOS or Excel settings can affect key combinations. If it does not work on your setup, use the ribbon command.

Excel for the web also has a Home tab and a Borders menu, so the menu is a dependable way to apply All Borders or a specific edge. Desktop keyboard sequences may differ in a browser because browser shortcuts and web-app keyboard handling can vary. If a shortcut is intercepted or does something unexpected, use the ribbon menu rather than assuming the workbook’s border settings are unavailable.

Common problems and how to fix them

  • Only the outside edge appears: Ctrl+Shift+& applies an outline, not internal cell borders. Select the range and use All Borders for a full grid.
  • The shortcut types a character or seems inactive: Confirm Excel has focus and the intended cells are selected. On many Windows keyboard layouts, the ampersand requires Shift plus the 7 key, so the physical key combination can feel less direct.
  • The Alt sequence opens a different command: Follow the KeyTips shown on your screen. Office language, version, or ribbon changes can affect the displayed letters.
  • Lines seem missing: Check the selected range and the border color. A white or very light line on a white fill can be difficult to see. Open More Borders and inspect the line style and preview.
  • Old borders remain after formatting: Applying a new border does not necessarily remove unrelated existing edges. Select the cells and use the Borders menu’s No Border command to clear borders, then apply the desired pattern again.
  • The lines do not print: Check whether they are worksheet gridlines rather than borders, and confirm that the cells are inside the print area.

When using No Border, note that it clears borders for the selected cells, not just the edge you happen to be looking at. If the range has carefully formatted edges, use the individual border options to change only the necessary side.

When to use borders, and when not to

Borders help readers follow structured data, distinguish a heading, or identify a total. They work best when applied selectively. A border around a compact data table can clarify its shape; a heavier bottom line can separate a subtotal from the rows above. Applying thick borders to every cell in a large worksheet can create visual clutter and make the numbers harder to scan.

For data that will be sorted, filtered, or expanded, Excel’s table feature can be a better foundation than manually drawing a large grid. Select the data and choose Insert > Table, then use the table styles to establish consistent formatting. A table does not prevent you from applying borders, but its built-in style can make routine formatting easier to maintain as rows are added. For a one-off report or a small range, ordinary cell borders are often simpler.

Before sharing a workbook, consider whether borders clarify information or merely decorate it. Use a consistent line weight, reserve stronger lines for meaningful divisions, and check the result at normal zoom and in print preview if the sheet is intended for printing.

Frequently Asked Questions

What is the shortcut for all borders in Excel?
In the standard English ribbon on Windows, select the cells and press Alt, H, B, A in sequence. This chooses All Borders from the Home tab’s Borders menu and adds internal as well as outside lines.

What does Ctrl+Shift+& do in Excel?
It applies an outline border to the selected cell or range. It does not add borders between the cells inside a multi-cell selection.

How do I remove borders in Excel?
Select the relevant cells, then choose Home > Font > Borders > No Border to clear their borders. Ctrl+Shift+_ removes an outline border, but use No Border when you need to clear the whole selection.

Why do my Excel borders not show when I print?
The visible lines may be gridlines, which are separate from borders and are not printed by default. Apply actual cell borders, then check the print area and Print Preview.

Can I change a border’s color or thickness with a shortcut?
The quick shortcuts are for common border commands, not for choosing every line property. Use Home > Font > Borders > More Borders, select a color or line style on the Border tab, and apply it to the edges shown in the preview.

Related

Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.

More in How-to basics

Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources

Spotted an error in this guide? Let us know.