Amazon holiday deals See deals →ad

Ctrl Shift 7 in Excel: What It Does and How to Use It

Pressing Ctrl+Shift+7 in Excel applies the outline border to the selected cells. In other words, it draws a thin line around the outside edge of whatever range you have highlighted, leaving the inside of the range untouched. It is a quick formatting shortcut that saves you from opening the Format Cells dialog and choosing the border style by hand. You do not need any special setup to use it, but you do need to know what Excel considers the current selection, because the shortcut acts on the whole selected block rather than on individual cells. The same shortcut is sometimes written as Ctrl+Shift+& (ampersand) on keyboards where the 7 key also produces the ampersand symbol, and both descriptions refer to the same Excel command.

What You’ll Need

  • Excel installed on your computer, or Excel for the web in a browser.
  • A workbook open with at least one worksheet that contains cells you can select.
  • A keyboard with a working Shift key and a number row that includes the 7 key, or the equivalent key that produces the ampersand character on your layout.
  • The cells you want to outline selected before you press the shortcut.

Step-by-Step

  1. Open the workbook and click the worksheet tab that holds the data you want to format. The shortcut only affects the active sheet.
  2. Select the range you want to outline. Click the first cell, hold the mouse button, and drag to the last cell, or click the first cell and then hold Shift and click the last cell. You can also type a range reference into the Name Box and press Enter. The selection should be the full block you want enclosed by the border, not just one corner.
  3. Check that the selection is correct before pressing anything. The outline border will be applied to the outer edge of exactly what is highlighted. If you select a single cell, you get a border around that single cell. If you select a block, you get a border around the block.
  4. Press and hold Ctrl, then press and hold Shift, then press the 7 key. Release all three keys. On many keyboards the 7 key is also the ampersand key, so the combination is often described as Ctrl+Shift+&. Either way, you are pressing the same physical keys.
  5. Look at the selected range. A thin border should now run around the outside edge of the selection. The cells inside the range keep whatever borders they had before, so if they had none, the inside stays clean.
  6. If you want the border to be thicker or a different style, open the Home tab, find the Borders button in the Font group, and use its drop-down menu to choose a line style. The keyboard shortcut applies the default thin outline, and the menu is where you change it.
  7. To remove the outline later, select the same range and use the Borders menu to choose No Border, or press Ctrl+Z immediately after applying it to undo the last action.
  8. Save the workbook with Ctrl+S so the formatting is kept. Border formatting is stored with the file like any other cell format.

Common Mistakes

The most frequent mistake is pressing the shortcut with only one cell selected when the intention was to outline a whole table. Excel does exactly what the selection says, so a single-cell selection produces a single-cell border. Another common problem is expecting the shortcut to add borders between every row and column. It does not; it only draws the outside edge. If you want gridlines around every cell, use the All Borders option in the Borders menu instead. Some people also press Ctrl+Shift+7 while editing inside a cell rather than while the cell is selected, and in that state the keystroke does not apply a border. Press Esc first to leave edit mode, then select the range and try again. Finally, on keyboards where the number row behaves differently or where a function key is required to reach the number keys, the combination may not register; check that the 7 key produces the expected character before blaming Excel.

Tips

Use the Name Box to select large ranges quickly, then apply the outline in one keystroke. If you outline the same kind of block often, record a short macro or add the Borders command to the Quick Access Toolbar so the action is one click away. Remember that the outline shortcut uses the border style last chosen in the Borders menu, so if you previously picked a thick line, the shortcut may apply that style rather than a thin one. To keep results predictable, set the line style back to thin before using the keyboard shortcut. You can also apply the outline to several non-adjacent ranges at once by holding Ctrl while selecting each block, then pressing the shortcut; Excel applies the border to each selected block separately. Keep in mind that borders are formatting, not data, so they do not affect calculations, sorting, or filtering.

Troubleshooting

If nothing happens when you press the keys, first click on the worksheet grid to make sure the Excel window has focus rather than a dialog box or the formula bar. If the shortcut still does nothing, check whether another program is intercepting the key combination; some keyboard utilities and screen readers use similar shortcuts. Try the equivalent Ctrl+Shift+& description if your keyboard layout labels the key that way. If a border appears in the wrong place, undo with Ctrl+Z, reselect the range carefully, and try again. If the border looks too faint, it may be that the worksheet gridlines are competing visually; you can turn gridlines off in the View tab to see the applied border more clearly. If the shortcut applies a border to only part of what you selected, the selection probably contained hidden rows or a mix of merged and unmerged cells, and merged cells can make border placement behave unexpectedly. Unmerge the cells, apply the border, and merge again if needed. Menus and ribbon layouts differ between Excel versions and between the desktop and web apps, so if a menu item is not where you expect, look for the Borders group on the Home tab.

Frequently Asked Questions

What does Ctrl+Shift+7 do in Excel? It applies an outline border around the currently selected cells, drawing a line around the outside edge of the selection.

Is Ctrl+Shift+7 the same as Ctrl+Shift+&? Yes. On many keyboards the 7 key also produces the ampersand, so the two descriptions refer to the same key combination.

Does it add borders between rows and columns? No. It only outlines the outer edge of the selection. Use the All Borders option in the Borders menu if you want lines around every cell.

Why does nothing happen when I press it? The Excel window may not have focus, the cell may be in edit mode, or another program may be capturing the shortcut. Click the grid, press Esc, and try again.

Can I change the border style it applies? The shortcut uses the border style last selected in the Borders menu. Choose a different line style there first if you want a thicker or dashed outline.

Does the border affect my data or formulas? No. Borders are formatting only and do not change values, calculations, sorting, or filtering.

Ctrl Shift 7 in Excel: What It Does and How to Use It

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top