Yes. In Excel for Microsoft 365 on Windows, select the cells and press Alt, H, B to open the Borders menu, then press the letter shown for the border you want. For a quick outline border, press Ctrl+Shift+&; these shortcuts can save time when formatting tables, but the ribbon and Format Cells dialog are better for detailed styles.
How the Excel border hotkeys work
Excel’s Windows ribbon uses sequential access keys, also called KeyTips. Press and release Alt, then press H for the Home tab, followed by B for the Borders menu. Do not hold all the keys down at once: this is a sequence, not a single three-key chord. The menu displays letters beside its available commands; press the letter for the border action you need.
In the standard English-language Microsoft 365 interface, common sequences include Alt, H, B, A for All Borders, Alt, H, B, O for Outside Borders, and Alt, H, B, N for No Border. The exact KeyTips can vary with Excel version, language, or interface changes, so use the letters displayed onscreen if they differ. You can also reach the same controls with the mouse at Home > Font > Borders.
A useful distinction: the ampersand shortcut applies an outline border to the selected cells, while the Borders menu offers different arrangements, including internal lines. If you need a grid across every cell in a range, choose All Borders rather than relying on the outline shortcut.
Common shortcuts and what they do
These are the most useful approaches for everyday formatting. KeyTip sequences are for Excel on Windows with the English ribbon; the dedicated ampersand shortcut is also a Windows shortcut.
- Alt, H, B, A: apply borders around every cell in the selection with All Borders.
- Alt, H, B, O: apply an outside border around the selection.
- Alt, H, B, N: remove borders from the selected cells.
- Alt, H, B, B: apply a bottom border in the standard English KeyTip menu.
- Ctrl+Shift+&: apply an outline border to the selection.
- Ctrl+Shift+_: remove the outline border. On many keyboards, typing the underscore requires holding Shift with the hyphen key.
- Ctrl+1: open Format Cells, where the Border tab provides detailed control over edges, line styles, and colors.
In KeyTip sequences, press each key in turn. For example, select A1:D8, tap Alt, tap H, tap B, then tap A to place borders around each cell in that selected block. The same command works on a single cell, a contiguous range, or multiple selected areas, although non-adjacent selections can make it harder to judge the result at a glance.
Choosing between All Borders and Outside Borders
Border commands describe which edges Excel formats, not whether the cells contain data. All Borders adds lines around the perimeter of each cell in the selection and between adjacent cells. For a small table, this creates a complete grid. Outside Borders formats only the outer edge of the selected range, leaving its interior without added lines.
For example, if a report has headings in A1:D1 and six rows of values below, selecting A1:D7 and applying All Borders produces a cell-by-cell grid. Applying Outside Borders to the same range outlines the table but does not divide its rows and columns. You might combine formats: use All Borders for the body, then select the heading row and choose a stronger bottom border from the menu or dialog.
Be precise about the selection. If you select A1:D7, the outside edge encloses that whole block. If you select only A1:D1, Outside Borders outlines just the heading row. Applying a border to a whole column can format many more cells than intended, including blank ones, so select the actual table range when practical.
Using the Format Cells dialog for custom borders
Hotkeys are fastest when you want a standard border. For a particular line weight, color, or combination of edges, select the cells and press Ctrl+1 to open Format Cells, then choose the Border tab. The dialog includes line-style and color choices, presets such as None, Outline, and Inside, and a preview where individual edges can be switched on or off.
A practical sequence is to choose the line style and color first, then click the edges in the preview. That makes it easier to create, for example, a thin gray interior grid with a thicker colored outline. The presets can be a quick starting point, but selecting a preset may reset or replace existing edge choices. Check the preview before pressing OK, especially when adding only one edge to a formatted range.
The dialog is also useful when a workbook already has mixed borders. The Borders menu applies a named arrangement, whereas the preview helps you see which edges are active for the current selection. If formatting is inconsistent across cells, inspect a smaller selection or one cell at a time to identify what is already applied before changing the whole range.
Removing borders without changing other formatting
Use Alt, H, B, N to choose No Border for the selected cells. This removes cell borders but does not, by itself, clear the contents, number formats, font, fill color, or other formatting. That makes it preferable to clearing all formatting when the only problem is unwanted lines.
The shortcut Ctrl+Shift+_ has a narrower purpose: it removes the outline border. It should not be treated as a guaranteed way to remove every interior border from a multi-cell range. For a complete cleanup, select the target cells and use No Border, then inspect the range to confirm that the unwanted lines are gone.
Also distinguish borders from worksheet gridlines. Gridlines are the faint guides Excel displays across cells by default; they are not the same as borders you add through the Borders menu. Hiding gridlines does not erase cell borders, and removing borders does not necessarily hide gridlines. Gridline visibility is controlled separately on the View tab.
Common problems and quick checks
If a shortcut seems not to work, check the selection and the kind of line you are trying to change before repeating it. Border formatting can appear subtle, particularly with white or very light border colors, or when worksheet gridlines are visible behind the formatted area.
- The KeyTip letters differ: follow the letters displayed on your ribbon. The sequence can vary by language or Excel version.
- You get a complete grid instead of an outline: check whether you chose All Borders rather than Outside Borders.
- Lines remain after using the outline shortcut: internal borders may still be present. Use No Border to remove all borders from the selection.
- The table still looks lined after removing borders: those may be worksheet gridlines, not cell borders. Check View > Gridlines.
- Only some cells change: confirm that the whole intended range was selected before opening the Borders menu.
- The result has the wrong color or thickness: inspect the Border tab in Format Cells; a previous custom style may affect the appearance of subsequently applied borders.
When diagnosing an unexpected result, test the command on a small sample range first. This is especially helpful in a workbook with merged cells, conditional formatting, or a complicated existing table layout. The visible result can depend on neighboring cell edges and existing formatting, so a small test can reveal whether the issue is the shortcut, the selection, or the format itself.
Windows, Mac, and Excel for the web
The Alt-based KeyTip sequence in this guide is intended for Excel for Microsoft 365 on Windows. On a Mac, ribbon access-key behavior and keyboard mappings differ; do not assume that pressing Alt, H, B will navigate the same way. Use the Home tab’s Borders control, or open Format Cells with the Mac shortcut shown by Excel for your keyboard and version. In many current Mac setups, Command+1 opens Format Cells, but keyboard behavior can depend on the Mac keyboard and system settings.
Excel for the web also presents the Borders control on the Home ribbon, but browser shortcuts and access-key behavior can affect how a key sequence is interpreted. If a Windows desktop sequence does not work in the browser, use the ribbon menu instead. The command names and border concepts—All Borders, Outside Borders, and No Border—remain the useful guide to choosing the right action.
If you switch between platforms, the most reliable habit is to remember the command you want rather than relying on a memorized letter sequence. On each version, find Borders on the Home tab and verify the available labels. This avoids accidentally triggering a browser command or using a shortcut that belongs to a different operating system.
When borders are the right formatting choice
Borders are useful for separating totals, outlining input areas, and making compact tables easier to scan. They are not always the best way to structure a worksheet. A dense grid around every cell can make a large report visually heavy; using a header fill, whitespace, or a single rule below headings may be clearer. For a financial or operational table, consistent borders can help readers follow rows, but the formatting should support the information rather than compete with it.
Excel Tables are another option for structured data. Select the data and use Home > Format as Table to apply a table style with banded rows and built-in filtering. This is not just a border shortcut: an Excel Table adds structured behavior, and its visual style can be changed independently. Use manual borders when you need precise edge formatting or when the range is not meant to function as a structured table.
Frequently Asked Questions
What is the shortcut for all borders in Excel?
On the standard English Windows ribbon, select the cells and press Alt, H, B, A in sequence. If the KeyTips shown on your ribbon differ, follow the displayed letters for All Borders.
How do I add an outside border in Excel?
Select the range and use the Borders menu’s Outside Borders command. In the standard English Windows KeyTips, the sequence is Alt, H, B, O. The command outlines the selection without adding lines between its cells.
How do I remove all borders but keep cell formatting?
Select the cells and choose No Border from Home > Font > Borders, or use the corresponding KeyTip sequence. This removes borders without clearing values, fills, or number formats.
Does Ctrl+Shift+& add borders around every cell?
No. It applies an outline border to the selected cells. Use All Borders if you want lines between the cells as well as around the outside of the selected range.
Why do lines remain after I remove borders?
They may be worksheet gridlines, which are separate from cell borders, or interior borders left behind by an outline-only removal shortcut. Use No Border to clear borders, and check View > Gridlines if faint worksheet guides remain.
Related
- Excel Data Analysis: What It Can Do and Where It Fits
- GPT for Excel Data Analysis: Uses, Limits, and Tips
- Finding a Z Value in Excel: Scores, Tests, and Cutoffs
Try it: the Date Difference Calculator: days, months, years and weekdays between two dates, with the DATEDIF formulas.
More in How-to basics
- Link Quantities in Excel: A Step-by-Step GuideTo link a quantity from one worksheet to another in Excel, enter a cell reference such as =Inventory!B2…
- 2-Dimensional Data Table in Excel: 10 Practical UsesIn Excel for Microsoft 365 on Windows, create a two-variable data table by putting a formula link in…
- Clear Email Address Cache in Outlook: Step-by-StepTo clear Outlook’s remembered email addresses, remove individual suggestions with the X beside them, or, in classic Outlook…
- Excel Repeatedly Not Responding? Causes and FixesIf Excel repeatedly shows “Not Responding,” first give it a short time to finish, especially if a large…
- Working With Styles in Microsoft Word: A Practical GuideIn Microsoft Word, styles are named sets of formatting that you apply to text, such as Normal for…
- American Date Format in Excel: How to Set MM/DD/YYYYTo display dates in American month/day/year order in Excel, select the date cells, press Ctrl+1, choose a date…
Sources: Function behaviour and menu paths: Microsoft Support documentation for Excel. Method & sources
Spotted an error in this guide? Let us know.