Learn › Excel › Add an outline border
Excel border shortcut: Ctrl + Shift + 7
Draw a thin outline around the selected cells with one key combination.
With voice. Recorded in Excel for the web; the shortcut works the same in desktop Excel. Recorded on a US keyboard. On other keyboards some keys differ: see the table below the video.
Keys on keyboards of other languages
The video is recorded on an English (US) keyboard. This is how the same shortcut is pressed on the keyboards of the other languages. The highlighted row is your language.
* Based on the keyboard layout, not tested on a real keyboard (only the Croatian one was tested). If the shortcut does not work, use the matching button on the ribbon.
What it does
Ctrl + Shift + 7 draws a thin border around the outside of the selected cells. The cells inside get no lines, only the outer edge of the whole block does.
When to use it
Use it to frame a table, a total or an area you want to stand out. Select the block first, then press the shortcut. For lines between all cells, use the Borders menu on the Home tab instead.
How to do it
- Select a block of cells: click the first cell, then hold Shift and press the arrow keys.
- Press Ctrl + Shift + 7 (on a Mac: Command + Option + 0).
- A thin outline wraps around the block. Press Ctrl + Z to undo it if you do not like it.
A quick example
In the task list, click A2 and select down to C6 with Shift and the arrow keys. Press Ctrl + Shift + 7: a thin outline appears around A2 to C6, and the cells inside stay without lines. Press Ctrl + Z and the border is gone.
Outline border, all borders and undo
Ctrl + Shift + 7 draws an outline only. The Borders menu on the Home tab has All Borders, Bottom Border and No Border for other cases. In desktop Excel, Ctrl + Shift + − removes the outline, but in Excel for the web it opens the Delete cells box, so use Ctrl + Z or No Border there.
Shortcuts mentioned on this page, with video:
Not working? Check this
- Nothing happens: click into the sheet first, not into the formula bar or a search box.
- Only a few edges got a line: you selected a smaller block than you thought. Check the selection before you press the shortcut.
- Ctrl + Shift + − opened a Delete box: in Excel for the web that shortcut deletes cells. Click Cancel, then use Ctrl + Z or No Border in the Borders menu.
- The shortcut does not work on your laptop: use the 7 in the number row, not on the numeric keypad.
- On a Mac use Command + Option + 0.
Quick answers
What is the shortcut for a border in Excel?
Select the cells and press Ctrl + Shift + 7. A thin outline is drawn around the whole selection.
How do I remove a border?
Press Ctrl + Z right after adding it, or select the cells and choose No Border in the Borders menu on the Home tab.
How do I draw lines between all cells?
Select the cells, open the Borders menu on the Home tab and choose All Borders.
Why does Ctrl + Shift + − open a Delete box?
In Excel for the web that shortcut deletes cells, it does not remove borders. Click Cancel and use Ctrl + Z or No Border instead.

