In Excel for Microsoft 365 on Windows, select the cell or range and press Ctrl+Shift+& to apply an outline border quickly. For more choices, press Alt, then H, B, and O in sequence to apply an outside border from the Home tab’s Borders menu.
What Excel’s quick border shortcut does
The shortcut Ctrl+Shift+& places a thin outline around the selected cell or range. On a standard US keyboard, the ampersand is usually typed with Shift+7, so the shortcut may feel like Ctrl+Shift+7. Keyboard layouts differ, however; use the key that produces the ampersand on your layout. If the shortcut is awkward or does not work on your keyboard, the ribbon menu is a dependable alternative.
An outline border is different from applying borders to every cell. If you select A1:C4 and use the shortcut, Excel frames the outside of the whole selection; it does not draw lines between each of the twelve cells. That makes the shortcut useful for emphasizing a small summary, a total, or a block of related data without adding a dense grid of lines.
To put borders around every cell in a selected block, use Home > Borders and choose All Borders. The Borders button is in the Font group, and its small arrow opens the menu. The button face may show the most recently used border, so click the arrow when you need to choose a specific option.
Use the ribbon for a quick outside border
On Windows desktop Excel, ribbon access keys offer a fast route that does not depend on remembering which border icon is shown. Select the target range, tap Alt, then tap H, B, and O. Tap the keys one at a time rather than holding all four down. The sequence opens the Home tab’s Borders menu and chooses Outside Borders.
For example, to frame a block of monthly figures in B2:E8, select B2:E8 and press Alt, H, B, O in sequence. Excel draws a border around the perimeter of the selected block. If you select only B2, the same command frames that single cell. In localized versions of Office, access-key letters can differ, so use the letters shown on screen after pressing Alt if this sequence is unavailable.
Other useful choices in the Borders menu include Bottom Border, Top Border, Left Border, Right Border, No Border, and All Borders. The exact menu also includes options such as Thick Outside Borders and More Borders. A quick way to add a bottom rule under a heading is to select the heading cells and choose Bottom Border; that creates a line along the bottom edge of the selection.
Choose the right border for the job
Choose the border pattern according to what the layout needs to communicate. An outside border groups cells visually, while internal borders separate entries. Too many heavy lines can compete with the numbers and make a worksheet harder to scan, so use a restrained style for ordinary lists and reserve thicker or colored lines for meaningful boundaries.
- Outside Borders: Frames the selected range as one block. Useful for a report section, a small summary, or a range whose perimeter should stand out.
- All Borders: Adds outlines around the cells, including the boundaries between adjacent cells. Useful for compact schedules or forms where each entry needs a visible box.
- Bottom Border: Adds a line under the selection. Often suitable for column headings or a subtotal row.
- Top and Double Bottom Borders: Can distinguish a final total from the rows above it. These options are available in the Borders menu on desktop Excel.
- No Border: Removes borders from the selected cells. It does not remove cell contents or change the worksheet’s gridline setting.
For example, a small sales report could use a bottom border beneath its headings, ordinary internal lines only if readers need to follow each row, and a heavier top or double bottom line for the grand total. Consistent use of a few styles is usually clearer than assigning a different color or weight to every section.
Set a custom line color or thickness
If the built-in border choices are not enough, open the Borders menu and select More Borders. This opens the Format Cells dialog on its Border tab. Choose a line style and, if needed, a color; then use the diagram’s edge buttons to specify which sides should receive that formatting. You can apply the selected line to the outline, interior edges, or particular sides of the selection.
The order matters: choose the line style and color before clicking the edge in the preview. If you change the style after setting edges, the dialog may not apply the new appearance to the edges you already selected as expected. Inspect the preview before confirming. A common custom use is a thin gray inside grid with a darker outside edge, which separates entries while keeping the group boundary visible.
The dialog also helps with irregular selections where you want only certain sides emphasized. Select the cells, choose a line style, and click the appropriate top, bottom, left, right, or interior controls in the preview. For a heading that spans several columns, for instance, you might add only a bottom line rather than outlining every side of the heading area.
Remove or change a border
To remove borders, select the affected cells, open Home > Borders, and choose No Border. This clears borders from the selected cells, including existing lines on their edges. When adjacent cells are formatted separately, a line can be associated with either side of a cell boundary; if a line remains or the result looks unexpected, select the full area around it and apply No Border, then add back the edges you want.
There is also a keyboard shortcut to remove the outline border: Ctrl+Shift+_ (Ctrl+Shift+underscore) on Windows. It removes the outline from the selected cells, rather than acting as a general replacement for the No Border menu command in every situation. For a complete cleanup of mixed formatting, use No Border from the menu and check the whole affected range.
To change a line rather than erase it, use More Borders and apply a different style or color to the relevant edges. Reapplying Outside Borders can update the range’s perimeter, but it does not necessarily reset internal lines. That distinction is useful when a range has both an outer frame and custom separators inside.
Border shortcuts on Mac and Excel for the web
Windows keyboard shortcuts do not always transfer directly to a Mac. In Excel for Mac, the standard ribbon access-key sequence Alt, H, B, O is not the same navigation method, and keyboard shortcut behavior can vary with the keyboard and macOS settings. The reliable route is to select the range and use Home > Borders, then choose Outside Borders, All Borders, or another listed choice. Mac users can also use the Format Cells dialog for custom lines.
Excel for the web has a Home tab with a Borders menu, so select cells and choose the border option there. Some desktop keyboard shortcuts or access-key sequences may behave differently in a browser, depending on the browser and system. If a shortcut is intercepted by the browser or does not produce the expected border, use the ribbon control. In all versions, confirm that the intended cells—not just the active cell—are selected before applying the border.
Borders are not the same as gridlines
A frequent source of confusion is that worksheet gridlines and cell borders are separate. Gridlines are the faint cell guides Excel displays across a sheet; they are not cell formatting and generally do not print by default. Borders are formatting attached to cells, can have different weights and colors, and can be set to print.
To hide or show gridlines in Windows desktop Excel, go to View > Show > Gridlines and toggle the check box. Hiding gridlines does not remove borders. To print gridlines, use the Page Layout tab, find the Sheet Options group, and select Print under Gridlines. Printing borders does not require gridlines to be enabled.
This matters when someone says a border “disappeared.” They may have hidden gridlines and mistaken them for borders, or they may expect faint worksheet guides to appear on paper. If a line should be visible in a printed report, apply an actual border and check Print Preview rather than relying on gridlines.
Copy a border and keep formatting consistent
For one-off formatting, the Format Painter on the Home tab can copy a cell’s formatting, including its borders, to another cell or range. Select the source cell, choose Home > Format Painter, and then select or paint over the destination. The destination may also receive other formatting such as font, fill, and number format; it is not a border-only tool.
Another option is to copy the source cell, select the destination, and use Paste Special > Formats. This also transfers formatting rather than just the border, so review the result if the destination has its own important number format or fill. If the goal is only to add the same border to several ranges, applying the border from the Borders menu to each selected range can be more predictable than copying every aspect of a cell’s formatting.
When building a worksheet that will be updated regularly, consider using an Excel table for structured lists. Tables provide built-in styles that can emphasize headers and band rows without manually drawing a border around every new record. A table style is not the same as an individually applied border, however; choose explicit borders when a precise printed layout or specific edge treatment matters.
Common quick-border problems
- The line appears around the wrong cells: Check the highlighted selection before using the shortcut. If only one cell is active, Excel applies the border to that cell rather than the intended range.
- There are no lines between cells: Outside Borders frames the group only. Choose All Borders if you also need internal separators.
- The border is hard to see: Open More Borders and check the line color and style. A very light color or thin line can blend into the sheet, particularly at reduced zoom.
- The worksheet looks bordered but prints without lines: The visible lines may be gridlines rather than borders. Apply actual borders, then inspect Print Preview.
- A border remains after using the shortcut to remove one: The shortcut removes the outline, not necessarily every custom internal edge. Select the range and use No Border to clear all its borders.
Also check whether the worksheet is protected if Excel will not let you change formatting. Protection settings can restrict formatting cells, depending on how the sheet was protected. If formatting is permitted only for certain areas, a border command may appear to do nothing in locked cells; the solution is to use an allowed range or ask the workbook owner to adjust protection rather than repeatedly applying the shortcut.
Frequently Asked Questions
What is the shortcut for an outside border in Excel?
On Windows desktop Excel, Ctrl+Shift+& applies an outline border to the current selection. Alt, H, B, O in sequence chooses Outside Borders from the Home ribbon menu.
How do I put a border around every cell in Excel?
Select the range, then choose Home > Borders > All Borders. This adds the outside edge and lines between the selected cells.
How do I add only a bottom border?
Select the cell or range, open Home > Borders, and choose Bottom Border. You can use More Borders if you need a different line color or thickness.
Why does my Excel border not print?
Check that the line is an actual cell border rather than a screen-only gridline. Borders normally print with the cells; use Print Preview to confirm the page layout and visibility.
How can I remove all borders from selected cells?
Select the cells and choose Home > Borders > No Border. This is the clearest option when the selection contains a mixture of outside and interior borders.
Related
- Excel Number Format K: Show Values in Thousands
- Excel Number Format: Keep Leading Zeros in Your Cells
- Excel Number Format: Hide Zeros Without Deleting Them
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Conditional Formatting Colour in Excel: Rules and FixesIn Excel, conditional formatting colour is a fill, font, border, data bar or icon that appears automatically when…
- Excel Application Not Responding: Causes and FixesIf Excel says “Not Responding,” first give it a few minutes if you just opened a large file,…
- How to Limit a Range in Google SheetsTo limit who can change cells in Google Sheets, select the cells, open Data > Protect sheets and…
- How to Add a Header in Excel for All PagesTo add a header to every printed page in an Excel worksheet, select the sheet, choose Insert >…
- Excel Shortcut to Select to the End of a ColumnIn Excel for Microsoft 365 on Windows, press Ctrl+Shift+Down Arrow to extend a selection from the active cell…
- Excel: How to Paste in Filtered Cells OnlyTo put the same value in visible rows of a filtered Excel range, select the target cells, choose…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.