Learn how to calculate the difference between two dates in Excel. Maybe you have tried…
An Excel worksheet consists of multiple cells that are divided by gridlines. If you want to learn how to add a border to a range of cells in Excel, you should read this article. You will learn how to insert, create and remove a border in Excel. We will start to create a border around cells in Excel. A border is a thick line that you apply around a single cell or a range of cells in a table that you want to stand out. It is a way to make the header, total rows, or other sections look more presentable in a structured view.
Table of contents
- Add a border to a range of cells
- Use the Format Cells box in Excel
- Remove the border around a range of cells in Excel
Add a border to a range of cells
There are different ways to add a border to a range of cells in a worksheet. Microsoft Excel explains how to apply or remove cell borders on a worksheet. Unfortunately, it does not show any pictures of the results to get a better understanding.
A worksheet has gridlines, which are the horizontal and vertical light gray lines between cells. When you add a border around your table, it will be easier to see the information. Look at the below example to see the difference between a table without borders (left picture) and with borders (right picture) on a worksheet.
Remember that you can choose whether you want to show gridlines on your printed page or not. Cell borders always appear on printed pages, unlike the gridlines in an Excel worksheet.
Now we will show you the easiest way to add a border to a range of cells in Excel.
- Select a single cell by clicking on that cell. Or select a range of cells in your worksheet by clicking on cell A1 in the upper left corner and dragging it out to the right-down corner of cell C7.
- You have to be in the Home tab.
- Then go to the Font group in the ribbon. Click on the down arrow next to the Borders icon > It will show a selection of different border styles.
- Select the required border from the selection. As you can see, the list only provides borders around cells.
Add basic cell borders using a shortcut
The keyboard shortcut for adding a basic borderline is CTRL + Shift + &.
Start by selecting the cells you want to add a border to. Then press the CTRL button on your keyboard, followed by the Shift button and the symbol &. It will immediately create a thin black border around the selected cells in Excel.
Use the Format Cells box in Excel
You can also create a border around cells in Excel by using the Format Cells dialog box. The difference is that you can decide the border color, thickness, and style.
Before you open this dialog box, you should first select a cell or a range of cells to add a border.
There are three ways to open the Format Cells box:
- You can press the keyboard shortcut, which is CTRL + 1.
- Or you can right-click on the selection > choose Format Cells. See the below picture.
- Select the cells
- Go to the Home tab
- Click on the drop-down arrow next to the Borders icon in the Font group
- It opens a list of borders > Then click on More Borders at the bottom of the list
Once you open the Format Cells box, you should follow the steps below to insert a border in Excel. Here you can decide the width and color of the cell borders.
- Click on the Border tab.
- Then it would help if you always started by choosing a border style > Click on the style you like the most.
- Thereafter you can also change the border color by clicking on the drop-down arrow. It will show you a selection of all the colors > Click on the color you like to use.
- In the Presets section, you should choose the border type. We have selected Outline borders, and the preview is shown underneath it. The top, bottom, left, and right border icons are therefore clicked automatically in the Border section.
- Click the OK button to confirm the changes.
Use shortcuts in the Format Cells dialog box
Once you open the Format Cells box, you have to be in the Border tab. In the Border section, you can see the preview of the border type you have chosen. In our example, we have clicked on all of the buttons to show the different lines.
Instead of clicking on each one of the buttons, you can also use different shortcuts to insert a border in Excel. Look at the picture below to understand the different borders.
- Top border: Alt + T
- Horizontal interior: Alt + H
- Bottom border: Alt + B
- Rightward diagonal: Alt + U
- Left border: Alt + L
- Vertical interior: Alt + V
- Right border: Alt + R
- Leftward diagonal: Alt + D
You can insert multiple border types in Excel, like the left and right border. If you want to use the shortcut, keep pressing the Alt button on your keyboard, followed by L and R. It will make a left and right border.
Remove the border around a range of cells in Excel
Once you create a border around cells in Excel, you can always remove a border in Excel. You can choose whether to remove all borders at once or one cell border at a time.
Remove all cell borders in Excel
You can remove all the borders from your cells in a few steps.
- Start by selecting a cell or range of cells with borders you want to remove
- Go to the Home tab
- Then click on the drop-down arrow next to the Border icon in the Font group in the ribbon
- It will open a selection of border styles
- Now click on No Border
This will automatically remove all the borders from the selected cells.
Keyboard shortcut to remove all borders in Excel
If you want to remove all borders at once, you should start by selecting the range of cells with borders.
Then you can use the keyboard shortcut to remove all cell borders: CTRL + Shift + _
Press the CTRL button on your keyboard, followed by the Shift button and the underscore symbol (_). It will automatically remove all the cell borders from the selected area on your worksheet.
Open Format Cells box to remove all borders
You can also remove a border in an Excel worksheet by opening the Format Cells box. The benefit is that you can choose to remove all borders or some cell borders styles. In the above section (Use the Format Cells dialog box in Excel), we have shown that you can open the Format Cells box in three ways.
- First, select the range of cells you want to remove the border
- Then you have to open the Format Cells box:
- By using the shortcut CTRL + 1
- Or right-click on the selected area > Choose Format Cells.
- Or click on the drop-down arrow next to the Borders icon > Then select More Borders at the bottom of the list.
- Click on the Border tab in the Format Cells box
- Then go to the Presets section, and click on None
- It will remove all the borders from your selected cells, as shown in the preview below
- Lastly, click OK
How to remove one border at a time
Let’s say you only want to remove the bottom line of a single cell. Luckily, there is an option to remove a cell border manually. You can easily do this by following the steps below.
- First, make sure you are in the Home tab
- Go to the Font group in the ribbon > Then click on the drop-down arrow next to the Border icon
- Now click on Erase Border
The icon changes into an eraser, and your mouse cursor looks like an eraser. Now you can click on each cell border to remove it. See the below picture with all borders.
If you click on the cell, it only removes the bottom border, like in the below picture.
When you are done erasing the cell borders, you need to go back to the normal mouse cursor. Therefore, you have to click on the drop-down arrow next to the Eraser icon. Then click on Erase Border from the selection. Now everything is back to normal.
Read more: How to create an Excel table with headers »
You have learned how to add a border to a range of cells in Excel using the ribbon’s Border icon. Another way to insert a border in Excel is to use the Format Cells box or a simple shortcut. Remove all borders using a shortcut, the Format Cells box, or by clicking No Border from the ribbon’s Border selection. You can also remove a border of a cell by using the Eraser in Excel.