How to create, change and remove border in Excel

The tutorial shows how to border cells in Excel by using the predefined options and how to create your custom cell border style.

Sometimes Excel worksheets can be difficult to read because of dense information and complex structure. Adding border around cells can help you distinguish different sections, emphasize certain data, such as column headings or total rows, and make your worksheets better presentable and more attractive.

What are cell borders in Excel?

Border is a line around a cell or a block of cells in Excel. Generally, cell borders are used to accent a specific section of a spreadsheet to make it stand out. For example, you can insert a border to draw attention of viewers to totals or other important data on the sheet.

Please do not confuse cell borders with worksheet gridlines. Borders are ticker and more prominent. Unlike gridlines, cell borders do not appear in a worksheet by default, you need to apply them manually. When printing out a document, the borders will appear on printed pages regardless of whether you print gridlines or not.

Microsoft Excel offers a few different ways to add a border around a single cell or a ranges of cells.
Cell borders in Excel

How to create border in Excel

The fastest way to make a border in Excel is to apply one of the inbuilt options directly from the ribbon. Here's how:

  1. Select a cell or a range of cells to which you want to add borders.
  2. On the Home tab, in the Font group, click the down arrow next to the Borders button, and you will see a list of the most popular border types.
  3. Click the border you want to apply, and it will be immediately added to the selected cells.

For example, this is how you can apply an outside border around cells in Excel:
Creating a border in Excel

More examples of Excel cell borders can be found here.

Tips:

  • To apply a line color and style other than defaults, choose the desired Line Color and/or Line Style under Draw Borders first, and then select borders.
  • The Border button on the ribbon only provides access to outside border types. To access all available settings, including inside borders, click More Borders… at the bottom of the drop-down menu. This will open the Format Cells dialog box, which is explained in detail in the next section.

How to insert border in Excel with Format Cells dialog

The Format Cells dialog is the most effective method of adding borders in Excel. It gives you easy access to all the settings including the line color and thickness as well as a nice diagram preview.

To insert a border via the Format Cells dialog, this is what you need to do:

  1. Select one or more cells to which you'd like to add borders.
  2. Open the Format Cells dialog box by doing one of the following:
    • Click the down arrow next to the Borders button, and then click More Borders at the bottom of the drop-down list.
    • Right click the selected cells and choose Format Cells… from the context menu.
    • Press Ctrl+1 shortcut.

    The More Borders option in Excel

  3. In the Format Cells dialog box, switch to the Border tab and choose the line style and color first. And then, either use Presets to add the outside or inside borders or construct the desired border by selecting individual elements such as border top, bottom, right or left. The preview diagram will reflect the changes immediately.
  4. When done, click OK.
    Insert a border in Excel via the Format Cells dialog

Excel border shortcuts

To quickly insert and remove cell borders, Excel provides a couple of keyboard shortcuts.

Add outside border

To add an outline border around the current selection, press the following keys at the same time.

Windows shortcut: Ctrl + Shift + &

Mac shortcut: Command + Option + 0

Remove all borders

To remove all borders within the current selection, use the following key combinations.

Windows shortcut: Ctrl + Shift + _

Mac shortcut: Command + Option + _

Note. Excel border shortcut does not give you control over the line color and thickness. To create borders professionally, it is recommended to use the Format Cells dialog that provides full access to all the settings.

Shortcuts for Format cells dialog

On the Borders tab of the Format Cells dialog, you can also use the following shortcuts toggle borders on and off:

  • Left border: Alt + L
  • Right border: Alt + R
  • Top border: Alt + T
  • Bottom border: Alt + B
  • Upward diagonal: Alt + D
  • Horizontal interior: Alt + H
  • Vertical interior: Alt + V

Tip. In case you are adding multiple borders, it is sufficient to press Alt just once, and then you can hit only the letter keys. For example, to place the top and bottom borders, press Alt + T, and then B.

How to draw borders in Excel

Instead of selecting cells first, and then choosing from a set of built-in options, you can draw borders directly on the worksheet. Here's how:

  1. On the Home tab, in the Font group, click the down arrow next to Borders. Near the bottom of the drop-down menu, you will see the Draw Borders group of commands that let you choose a drawing mode, line color and style.
  2. First, pick a Line Color and a Line Style. Once either one is selected, Excel automatically activates the Draw Border mode, and the cursor changes to a pencil.
  3. You can now start drawing individual lines in the default Draw Border mode or switch to Draw Border Grid mode. The difference is as follows:
    • Draw Border allows drawing a border along any gridline, which works great when making irregular borders. Dragging across cells will create a regular rectangular border around a range.
    • Draw Border Grid places outside and inside borders at a time when you click and drag across cells. When you follow a gridline, a single line is added just like when using the Draw Border option.
  4. To stop drawing borders, click the Border button on the ribbon. This will force Excel to exist the drawing mode, and the cursor will change back to a white cross.

Drawing a border in Excel

Tip. To delete the entire border or any of its elements, use the Erase border feature as describe in Erasing borders.

How to create a custom border style in Excel

In none of the predefined cell borders meet your needs, you can create your own border style. Here are the steps to perform:

  1. On the Home tab, in the Styles group, click Cell Styles. If you do not see the Cell Styles button, click the More button in the bottom right corner of the Styles box.
    Excel Cell Styles
  2. Near the bottom of the drop-down menu, click New Cell Style.
    Creating a custom cell style in Excel
  3. In the Style name box, type a name for your new cell style (Bottom double border in our case), and then click Format.
    Name a custom cell style.
  4. The Format Cells dialog box will open. You switch to the Border tab and select the line style, line color and borders of interest. When done, click OK.
    Setting up a custom border style in Excel
  5. In the Style dialog box, clear the boxes for any formatting that you do not want to include in the new style, and click OK. Done!
    Choose which formatting to include in the new cell style.

To apply your custom border style, just do the following:

  1. Select the cells you'd like to format.
  2. On the Home tab, in the Styles group, click the style you've created. Usually appears in the top left corner of the Styles box. If you do not see it there, then click the More button next to the Styles box, find your new style under Custom, and click on it.

Your custom style will be applied to the selected cells at once:
Apply a custom cell border.

How to change the color and width of cell borders

When you add a cell border in Excel, a black (automatic) line color and a thin line style is used by default. To change the color and width of cell borders, please follow these steps:

  1. Select the cells whose border you want to change.
  2. Press Ctrl + 1 to open the Format Cells dialog box. Or right-click the selected cells, and then click Format Cells in the popup menu.
  3. Switch to the Border tab and do the following:
    • From the Line box, choose the desired style for the border line.
    • From the Color box, pick the preferred line color.
    • In the Presets or Border section, select your existing border type.
    • Check the result on the preview diagram. If you are happy with the changes, click OK. If not, try another line style and color.

    Changing color and width of cell borders

Examples of cell border in Excel

Below you will have a few examples of how your Excel borders may look like.

Outside border

To apply an outline border around cells, use either Outside Borders or Think Outside Borders option:
Applying an outside border

Top and bottom border

To apply top and bottom border in Excel with a single command, use this option:
Apply top and bottom border in Excel with a single command

Top and thick bottom border

To apply top and thick bottom border, use this one:
Apply thing top and thick bottom border in Excel.

Bottom double border

To place a bottom double border in Excel, use the below command. This option comes especially handy for separating a total row:
Placing a bottom double border in Excel

Inside and outside borders

To place both inside and outside borders at a time, use the All Borders command:
Use the All borders command to insert inside and outside cell borders at a time.

To put only inside borders or use different colors and line styles for inside and outside borders, use either the Draw Borders feature the Format Cells dialog. The below image shows one of many possible results:
Use different colors and line styles for inside and outside borders.

Creating borders in Excel - useful tips

The following tips will give you some insight into Excel cell borders that may help you use them more efficiently.

  • Each border that you add or change will follow the current settings for the line style and thickness. So, be sure to choose the line color and style first, and then select the border type.
  • Unlike gridlines that may or may not be visible on printouts, cell borders always appear on printed pages.
  • To have cell borders inserted automatically, format your data as an Excel table and choose from a rich collection of predefined table styles.

How to remove a cell border in Excel

Depending on whether you want to delete all or specific borders, use one of the following techniques.

Remove all borders

To delete all borders within a range, this is what you need to do:

  1. Select one or more cells that you wish to remove a border from.
  2. On the Home tab, in the Font group, click the arrow next to Borders, and choose No Border.

Remove cell borders in Excel.
Alternatively, you can use the remove borders shortcut: Ctrl + Shift + _

If you choose to remove all formatting in Excel, this will also remove cell borders.

Erase individual borders

To remove borders one at a time, use the Erase Border feature:

  1. On the Home tab, in the Font group, click the arrow next to Borders, and choose Erase Border.
  2. Click each individual border that you want to delete. It's also possible to erase all borders in one go. For this, click Erase Border and drag the eraser across cells.
  3. To exit the erasing mode, click the Border button.

Erasing borders in Excel

That's how to create and change borders in Excel. I thank you for reading and hope to see you on our blog next week!

5 comments

  1. The borders I am trying to delete are the ones that were already on an Invoice template. None of the suggestions above seems to work to delete them.
    It is Excel for Mac.
    Any suggestions?

  2. Good

  3. How do I use the greyed out parts under the More Borders option? I want the border across the middle of the cell.

  4. Your tips are more that that - they are thorough tutorials! Plenty of pictures, too! Thank you!

    There is a style that I frequently like to use: double lines as outside borders. I often use it to outline entire tables.

    Is there a way to add this configuration (or any other configuration, like colored lines, for instance) to the drop-down menu? It would make my life a lot easier.

    Again, thanks for any help you can provide.

    1. Hi Marilyn,

      Thank you for your kind feedback! I do not know a way to add a custom style to the Borders drop-down menu. However, you can add it to the Styles gallery like shown in How to create a custom border style, and then apply with a mouse click.

Post a comment



Thank you for your comment!
When posting a question, please be very clear and concise. This will help us provide a quick and relevant solution to
your query. We cannot guarantee that we will answer every question, but we'll do our best :)