In general, the border is a line around a cell. It makes the cell more specific to its users in terms of visualization. There are different types of borders among which all borders are mostly used. In this article, we will learn how to apply all borders in excel with 4 quick methods.
Get the sample file and try it yourself.
4 Quick Methods to Apply All Borders in Excel
For example, we have a dataset here. The dataset has information on the profit amount of a company in the first six months.
As you can see the dataset looks quite pale. Therefore, we will follow the methods to apply all borders in it.
1. Insert All Borders from Home Tab in Excel
In this first method, we will insert all borders from the Home tab in excel. Follow the steps below.
- First, select the cell range B4:C10.
- Then, go to the Home tab and select the Border icon under the Font group.
- After that, select All Borders from the drop-down.
- That’s it, you can see the cells are now inside a significant border.
Read More: How to Add Cell Borders Inside and Outside in Excel (5 Methods)
2. Use Keyboard Shortcuts to Apply All Borders
The keyboard shortcut is the easiest method to apply all borders in a worksheet. Let’s see how it works.
- First, select the whole worksheet.
- Then, press Alt + H + B to navigate to the Border option.
- Now, adding to that, press Alt + H + B + A on your keyboard.
- Finally, you have all the borders on your worksheet.
3. Insert All Borders in Excel with Draw Borders
Another easy method is using the Draw Borders feature in excel to apply all borders in the dataset. Check the steps below:
- First, select cell range B4:C10.
- Then, go to the Home tab.
- Select Border under the Font group.
- Now, from the drop-down section, select Draw Border Grid under the Draw Borders option.
- Following, you will see a Pen icon on your worksheet.
- Next, hover it on the cells where you need all borders.
- Lastly, go to the Border command again and then click on Draw Border Grid to turn it off.
- Finally, you have got all borders on your selected cells.
Read More: How to Add or Remove Cell Borders in Excel
4. Apply All Borders with Excel VBA
The last method is using excel VBA Macro to apply all borders in the worksheet. Following is the process:
- In the beginning, go to the Developer tab and select Visual Basic under the Code group.
- After this, choose Module from the Insert section.
- Next, insert this code for cell range B4:B10 on the blank page.
Sub Border_Cells() Range("B4,B5,B6,B7,B8,B9,B10").BorderAround LineStyle:=xlContinuous, Weight:=xlThin End Sub
- Then, click on the Run Sub button or press F5 on your Keyboard.
- Following, click on Run on the Macros window.
- Finally, it shows all borders on the selected cells.
- Moreover, you can add the cell range C4:C10 also in the VBA code and you will get your final output.
How to Format All Borders in Excel
Here is a quick overview of the opportunities to format all borders in excel.
- First, go to the Border command from the Home tab.
- Then, select More Borders from the drop-down section.
- Now, change the Color and Style of the Line from the Border tab as per your preference.
- You can also change the border style from the Border section.
- After that, press OK.
- In the case of VBA, you will find the line weight and line type options during typing macro code.
How to Remove All Borders in Excel
So, as we have learned the methods to apply all borders in excel, we will need to remove it at any stage of working. Here are two quick tips to do it.
- You can select the No Border option from the Border command in the Home tab.
- Otherwise, press Ctrl + Shift + _ on your keyboard to remove all borders from your worksheet.
Things to Remember
- It is a good practice to fix the color and style first otherwise you will have to format it in each worksheet with all borders.
- Unlike gridlines, All Borders are always visible in printing.
- The All Borders feature is visibly similar to the Table feature but different in functions.
- Make sure, you select the cells before removing all borders.
Finally, we have learned how to apply all borders in excel with 4 quick methods. We also went through its formatting ideas and removal tips. Let us know your feedback in the comment box. Follow ExcelDemy to find out more excel related blogs.