Select the cells, open the Home → Borders drop-down and pick a border: All Borders for a grid, Outside Borders for a box around the range, or Bottom Border for a line under a heading.
From the keyboard, Ctrl + Shift + & adds an outline border to the selection and Ctrl + Shift + _ removes all borders. For any other option in the list, press Alt → H → B and then its letter, such as A for All Borders.
For a different colour, thickness or style, press Ctrl + 1 and open the Border tab. Choose the line style and colour first, then click Outline, Inside or the edges in the preview, and click OK.
The ribbon remembers the last Line Color and Line Style you picked under Borders → Draw Borders. If new borders come out red or dashed, set them back to Automatic and a thin line there.
Borders print; gridlines don’t by default. If a table looks lined on screen but prints blank, it’s relying on gridlines, so apply All Borders before you print or save to PDF.
In Excel, a border is like a four-sided line that is added around the cell or range of cells. It is used to highlight a particular area and separate that from the rest of the values on the spreadsheet.
Inserting a border draws the focus of the readers to the specific section, which enhances their interest in it.
In this tutorial, we will look at the ways to add borders along with their different types in Excel.
Steps to Apply Borders to a Cell in Excel
- First, select the cell or group of cells where you want to add a border in your spreadsheet.

- Then, go to the Home tab and in the “Font” group, click on the Borders button, which is right next to the bold, italic, and underline options.

- Once you click on the drop-down arrow of the Borders button, it will show you the list of borders.

- Now, select one from the list that you would like to apply around the selected cells.
Types of Borders in Excel
Here, you will learn about the different borders, which are categorized into 4 sections.

In the first section, there are Bottom, Top, Left, and Right borders. These borders will help you apply a border to only one side of a single cell or a range of cells.
To apply this to the selected values, just click on any type of border. In the following example, you can see the bottom border under the scale.

The second section has the No Border, All Borders, Outside Borders, and Thick Outside Borders options. You can easily remove the border from the selected cell by clicking on the no border option.

Next, you have the option to add a border to all four sides of the selected cells. Outside Borders draws a line only around the whole range, but with All Borders, the border lines separate every cell from the next, as shown in the picture below.

The third section contains more bottom borders, such as the bottom double border, thick bottom border, top and bottom border, top and thick bottom border, and top and double bottom border.

You can use these options for highlighting or underlining important text, headings or totals.

Draw the Border
In the last section, you have the option to customize or create the border of your choice by using drawing tools. You can also change the existing border with this.

- Draw Border: Once you click the draw border option, it will convert your cursor into the drawing pencil. Now, click on the cell and drag with the left mouse button to insert the border. It draws the outline of the area you drag over, both horizontally and vertically.

- Draw Border Grid: As the name suggests, it is also used to draw a border around the cells. But the main difference between the “Draw border” and “Draw border grid” is that the border grid draws the borders in the grid form (On Multiple Cells).

- Erase Border: The eraser helps you to erase the unwanted border line from your cells. To erase the border, you just have to drag the eraser on the line to remove it.

- Line Color: You can also change the color of the border to make it more attractive. When you click on Line Color, it opens a pop-up with a variety of colors. Once you pick one, use the pencil to draw the colored border.

- Line Style: To change the style of the borderline, click on the line style and choose one from the following styles.

Advanced Border Options
Choose the advanced borders for your selected cells. Follow the below steps:
- First, go to the “More Borders” option, which is at the bottom of the borders list.
- When you click, it will open a new dialog box called “Format Cells”.

- Here, on the Border tab, you have more options: the line style, the color, the presets (None, Outline, Inside) and buttons for each side and the diagonals.
- And, once you select any given preset, it will also show you how it looks after applying it in the box.

- In the end, click “OK” to apply the borders to the selected range of cells.

Remove Borders in Excel
- First, you just need to select the area from which you want to remove the border.
- Then, go to the borders list and select the “No Border” option from there.

- Now, the border lines will disappear around the selected cells.

Shortcut to Add Border
There is another way to add a border by using the shortcut. But before using the shortcut, first, you need to select the range where you want to insert the border.
Then, press ALT ⇢ H ⇢ B one after the other (not together). Once you do this, you will get the list of borders. Along with this, there are some specific options to set any kind of border on a cell or a range.

Let’s say you would like to set the Thick Bottom Border, and the shortcut key for this is H, as you see in the above screenshot. In this case, press ALT ⇢ H ⇢ B ⇢ H after selecting the data.

There are also two direct shortcuts. Ctrl + Shift + & adds an outline border around the selected cells, and Ctrl + Shift + _ (underscore) removes all the borders from them. And Ctrl + 1 opens the Format Cells dialog box, where you can go to the Border tab.
Change the Color and Style of a Border
The border options in the list always use the current line color and style. To change them for an existing border, the quickest way is the Format Cells dialog box:
- First of all, select the cells and press Ctrl + 1.
- After that, go to the Border tab and pick the line style and the color.
- In the end, click Outline and/or Inside (or the buttons for each side) to apply the new style, and click OK.
Borders vs Gridlines
The light gray lines you see on a sheet are gridlines, not borders. Gridlines don’t print unless you turn on the Print option for them (Page Layout ➜ Sheet Options ➜ Gridlines ➜ Print), and they are hidden when you fill cells with a color. Borders always print and stay visible, so use borders for the lines you want people to see on paper or in a PDF.
Frequently Asked Questions
How do I copy only the borders to other cells?
Use the Format Painter (Home ➜ Clipboard). It copies all the formatting, borders included. If you want only the formatting and not the values, Paste Special ➜ Formats does the same.
Why don’t my borders show up?
Check the line color: if it’s white, the border is there but you can’t see it on a white sheet. Also, a very light or thin border can look invisible when you zoom out.
Can I add borders automatically?
Yes. Format your data as a table (Ctrl + T) to get a table style (banded rows and, in many styles, lines) that grows with the data, or use conditional formatting with a border format to add lines only to the rows that have data.
Written by
Puneet Gogia
Microsoft MVP — Excel · Founder, Excel Champs
Twelve years of teaching Excel, and a decade before that using it as a data analyst. Every tutorial here is written from a file I actually built.