You may have an Excel dataset that has borders that are no longer appealing, useful, or necessary. You may want to remove them.
This tutorial shows you six easy ways to remove borders in Excel.
Method #1: Remove Borders Using Keyboard Shortcut
Personally, I love the keyboard shortcut to remove borders from the selected cells. It’s fast and easy and works all the time.
Suppose we have the following dataset that has borders that we no longer find useful or necessary.
Below is the keyboard shortcut to remove borders in Excel:
Ctrl + Shift + -
Here are the steps to use this keyboard shortcut:
- Select the dataset that has the borders that you want to remove
- Press Ctrl + Shift + – on the keyboard.
All the borders are removed at once:
Note: You can also use another keyboard shortcut ALT + H + B + N to remove the border from the selected cells
The above keyboard shortcut and all the methods covered in this tutorial will only remove the borders that have been applied as a format. This will not remove the gridlines or the borders applied using Conditional Formatting
Also read: How to Remove Strikethrough in Excel?
Method #2: Using the Borders Drop-down on the Ribbon
Suppose we have the following dataset that has borders that we no longer find useful or necessary.
We can remove the borders using the Borders drop-down in the Font group on the Home tab.
We use the following steps:
- Select the dataset that has the borders that you want to remove
- Click the Home tab, open the Borders drop-down in the Font group and select No Border.
All the borders are removed from the dataset:
Method #3: Remove Borders Using the Borders Drop-down in the Mini toolbar
Suppose we have the following dataset that has borders that we no longer find useful or necessary.
We can remove the borders using the Borders drop-down on the Mini toolbar.
We use the following steps:
- Select the dataset that has the borders that you want to remove
- Right-click the selected dataset, open the Borders drop-down on the Mini toolbar, and select No Border.
The above steps would instantly remove all the borders from the selected dataset
Method #4: Remove Borders Using the Format Cells Dialog box
Suppose we have the following dataset that has borders that we no longer find useful or necessary.
We can remove the borders using the Format Cells dialog box.
We use the following steps:
- Select the dataset that has the borders that you want to remove
- Right-click the selected dataset and select Format Cells on the shortcut menu that appears. This will open the Format Cells dialog box. You can also use the keyboard shortcut Control + 1 to open the Format Cells dilaog box
- In the Format Cells dialog box that appears, click the Border tab and select None in the Presets section, and click OK.
The above steps would instantly remove all the borders from the selected dataset (as shown below)
How to Remove Specific Borders
If we want to remove only some specific borders from a dataset, we can use the toggle buttons in the Border section of the Format Cells dialog box.
For example, if we want to remove only the inside borders from our dataset. We can click the toggle button showing a horizontal middle border and the toggle button showing a vertical middle border in the Border section and click OK.
Note: Instead of clicking the toggle buttons, we can also click the specific borders on the preview diagram to remove them.
All the inside borders are removed leaving only the outside borders:
Method #5: Remove Borders Using the Eraser Tool
Suppose we have the following dataset that has borders in cell B1 and cell C1 that we no longer find useful or necessary.
We can use the Erase Border option on the Borders drop-down on the Ribbon to remove borders from certain cells in our dataset.
We use the steps below:
- Click the Home tab, open the Borders drop-down and select Erase Border.
After selecting the Eraser Border option an Eraser tool appears:
- Click the Eraser tool on the border you want to remove. For example, we click on the vertical borders between cell A1 and cell B1, cell B1 and cell C1, and cell C1 and cell D1. The borders are removed.
Method #6: Remove Borders Using VBA in Excel
Suppose we have the following dataset that has borders that we no longer find useful or necessary.
We can remove the borders using Excel VBA.
We use the following steps:
- Click the Developer tab and then click on the Visual Basic Icon. This will open the VB Editor in Excel. You can also use the keyboard shortcut ALT + F11 to open the VB Editor
In case you do not see the Developer tab, click here to see how to enable it.
- In the Visual Basic Editor, insert a module using any of the following ways:
- Open the Insert menu and select the Module item.
- Right-click the ThisWorkbook object in the Project Explorer window and select Module on the Insert flyout menu.
- Type the following sub-procedure in the module:
'Code developed by Steve Scott from https://spreadsheetplanet.com
Sub RemoveAllBorders()
Range("A1:C13").Select
With Selection
.Borders(xlDiagonalDown).LineStyle = xlNone
.Borders(xlDiagonalUp).LineStyle = xlNone
.Borders(xlEdgeLeft).LineStyle = xlNone
.Borders(xlEdgeTop).LineStyle = xlNone
.Borders(xlEdgeBottom).LineStyle = xlNone
.Borders(xlEdgeRight).LineStyle = xlNone
.Borders(xlInsideVertical).LineStyle = xlNone
.Borders(xlInsideHorizontal).LineStyle = xlNone
End With
End Sub
- Save the sub-procedure and save the workbook as a Macro-Enabled Workbook so that you do not lose the procedure.
- Place the cursor anywhere in the procedure and press F5 to run the code.
- Press Alt + F11 to switch back to the active worksheet. See that all borders have been removed from the dataset.
In this tutorial, we have covered six simple techniques you can use to quickly remove cell borders in Excel.
They include using the Borders drop-down on the Ribbon or Mini toolbar, a keyboard shortcut, the Eraser tool, the Format Cells dialog box, and Excel VBA.
Personally, I prefer the keyboard shortcut to remove borders as it’s fast and easy.
You can use the technique or techniques that best fit your situation.
Other Excel articles you may also like:
- How to Add Cell Borders in Excel (3 Easy Ways)
- How to Add Border to a Chart in Excel (4 Easy Ways)
- Apply Border to Cells in Excel (Shortcut)
- How to Remove Panes in Excel Worksheet (Shortcut)
- How to Remove Table Formatting in Excel? 3 Easy Ways!
- How to Remove Conditional Formatting in Excel? (5 Easy Ways)