How to Add Borders in Excel, Including Shortcuts
By ExcelReady TeamUpdated 5 min read
The short answer
To add borders in Excel, select the cells, click the arrow next to the Borders button on the Home tab and pick a style such as All Borders or Outside Borders. On Windows, Ctrl+Shift+& adds an outline and Ctrl+Shift+_ removes it. On a Mac, use ⌘+Option+0 to add and ⌘+Option+Hyphen to remove. Borders print; gridlines don't.
Key takeaways
- Home > Borders arrow gives quick styles: All Borders, Outside Borders, Thick Box Border and more.
- Windows: Ctrl+Shift+& adds an outline border and Ctrl+Shift+_ removes borders.
- Mac: ⌘+Option+0 adds an outline border and ⌘+Option+Hyphen removes it.
- Format Cells (Ctrl+1 or ⌘1) > Border sets line style, colour and each edge exactly.
- Gridlines don't print by default, so add borders to anything you will print or share as a PDF.
On this page+
To add borders in Excel, select the cells and pick a style from the Borders button on the Home tab. Borders make headers, tables and totals easy to read, and unlike the grey gridlines, they print. This guide shows the quickest ways to add and remove borders on Windows and Mac, how to set colours and line styles, and how to give a total row the classic accounting look.
How to add borders in Excel from the ribbon#
The Borders button gives you the common styles in two clicks.
- Select the cells, for example A1:B7.
- On the Home tab, in the Font group, click the small arrow next to the Borders button (it looks like a square split into four).
- Choose a style.
The styles you will use most:
| Style | What it does |
|---|---|
| All Borders | A line around every cell in the selection |
| Outside Borders | One line around the outside of the selection |
| Thick Outside Borders | A heavy box around the selection |
| Bottom Border | A line under each selected cell |
| Bottom Double Border | Two thin lines under the selection, used under totals |
| No Border | Removes every border from the selection |
The main button remembers the last style you chose. Click it directly to apply the same style again without opening the menu.
Keyboard shortcuts for borders#
Shortcuts are faster when you format a lot of ranges.
| Task | Windows | Mac |
|---|---|---|
| Add an outline border | Ctrl+Shift+& | ⌘+Option+0 |
| Remove borders | Ctrl+Shift+_ | ⌘+Option+Hyphen |
| All Borders | Alt, H, B, A | Borders menu on the Home tab |
| Open Format Cells | Ctrl+1 | ⌘1 |
On Windows, Ctrl+Shift+& is Ctrl, Shift and the 7 key on a US keyboard. Ctrl+Shift+_ is Ctrl, Shift and the minus key. The Alt sequence is pressed one key at a time: Alt, then H, then B, then A. The Borders menu shows a letter next to each style, so you can learn the others from there.
How to use Format Cells for custom borders#
Format Cells gives full control over line style, colour and each edge.
- Select the cells and press Ctrl+1 (⌘1 on a Mac).
- Open the Border tab.
- Pick a Style (thin, thick, dashed, double) and a Color first.
- Click Outline, Inside, or the individual edges around the preview.
- Click OK.
The order matters: choose the style and colour before you click the edges. If you click the edges first, Excel uses the default thin black line.
How to add borders to a total row#
Many reports use a single line above the total and a double line under it. This is often called accounting style.
- Add the total. With costs in B2:B6, type
=SUM(B2:B6)in B7. With the exercise data, that gives 1,940. - Select A7:B7 and choose Top Border from the Borders menu.
- With the same cells selected, choose Bottom Double Border.
Combine this with a currency format and the total is clear at a glance. The guide on formatting numbers as currency and percent shows the shortcuts for that step.
How to draw borders with the mouse#
For irregular shapes, drawing can be quicker than selecting. At the bottom of the Borders menu, choose Draw Border. The pointer becomes a pencil: click a cell edge to add a line, or drag across cells to draw an outline around them. Draw Border Grid draws every inside line as well.
Pick Line Color and Line Style from the same menu before you draw. Press Esc when you are finished, and the pointer goes back to normal.
Borders vs gridlines: what prints?#
Gridlines are the light grey lines you see on every sheet. They help you work on screen, but they don't print by default. Borders are formatting you add to cells, and they always print.
That is why a sheet can look neat on screen and plain on paper. You have two options:
- Add borders to the area you want printed. This gives you control over where lines appear.
- Print the gridlines by ticking Print under Gridlines on the Page Layout tab.
To see how your borders look without the grey grid, untick Gridlines on the View tab. Many people turn gridlines off for finished reports so the borders stand out.
How to remove borders#
To remove borders without touching anything else, select the cells and choose No Border from the Borders menu, or press Ctrl+Shift+_ on Windows (⌘+Option+Hyphen on a Mac).
Avoid Clear > Clear Formats unless you want to reset everything. It removes borders, but also bold, colours and number formats, so dates turn back into plain numbers like 45382. The guide on why Excel dates are numbers explains what you are seeing if that happens.
To remove one edge only, open Format Cells, go to the Border tab and click that edge in the preview to switch it off. You can also use Erase Border at the bottom of the Borders menu and click the lines you want gone.
Tips for clean borders#
A few habits keep borders looking professional:
- Use fewer lines. A border under the header and above the total is often enough. Full grids can look busy.
- Copy formatting with Format Painter. Click a formatted cell, click the paintbrush on the Home tab, then click or drag over the target cells.
- Try an Excel Table. Ctrl+T (⌘T on a Mac) applies banded rows and header lines automatically.
- Check wrapped headers. Long headers look best with Wrap Text and a bottom border. See how to wrap text in Excel.
Practise it#
Formatting is faster when your fingers know the keys. Try the total-row exercise on this page, then open the formatting shortcuts lesson to bold headers and apply currency and percent formats from the keyboard. Follow it with the More formatting lesson for italic, comma style, date formats and resetting cells to General. Each step is checked instantly.
Try it yourself
This is a live spreadsheet. Type the formula in the green cell and press Enter.
A total row usually gets a top border. First, add the total itself: click B7, type =SUM(B2:B6) and press Enter.
| A | B | C | D | |
|---|---|---|---|---|
| 1 | Cost | |||
| 2 | ||||
| 3 | ||||
| 4 | ||||
| 5 | ||||
| 6 | ||||
| 7 | Total | |||
| 8 | ||||
| 9 | ||||
| 10 |
Tip: SUM adds a range: from the first cost in B2 to the last in B6.
Practise this in a lesson
Frequently asked questions
What is the shortcut for borders in Excel?
On Windows, Ctrl+Shift+& adds an outline border around the selection and Ctrl+Shift+_ removes borders. On a Mac, press ⌘+Option+0 to add an outline and ⌘+Option+Hyphen to remove it.
How do I add all borders in Excel?
Select the range, click the arrow next to the Borders button on the Home tab and choose All Borders. On Windows, the key sequence Alt, H, B, A does the same.
Why are my Excel borders not printing?
You may be seeing gridlines, not borders. Gridlines don't print unless you tick Print under Gridlines on the Page Layout tab. Add real borders to the cells you want printed.
How do I remove all borders in Excel?
Select the cells and choose No Border from the Borders menu, or press Ctrl+Shift+_ on Windows. Clear Formats also removes borders, but it removes number formats too.
How do I change the border colour in Excel?
Open Format Cells with Ctrl+1 (⌘1 on a Mac), go to the Border tab, pick a colour and a line style first, then click Outline, Inside or the edges in the preview.