See all How-To Articles

How to Add Lines (Set Borders) in Excel & Google Sheets

In this article, you will learn how to add border lines in Excel and Google Sheets.

 

add lines borders 10

 

Set Borders From the Ribbon

A border is a line around a cell or range of cells. You can use it to emphasize certain data, separate different sections, etc. Worksheets in Excel are often full of information, so setting borders is useful in drawing attention to important information and making your spreadsheet look more organized and presentable. The fastest way to make borders in Excel is to use one of the preset options from the Ribbon.

1. First, select a cell or a range of cells where you want to add borders (in this example A1:C1).

2. Then in the Ribbon, click on Home.

3. In the Font group, click on the arrow next to the Borders button.

4. From the drop-down menu choose the border type you want to apply.

 

add lines borders 1

 

5. To apply a line color other than the default, choose the desired Line Color under Draw Borders and then select the border type.

 

add lines borders 11

 

Now you have borders around the cell or range of cells you selected (in this example, A1:C1).

 

add lines borders 12

 

NOTE: You can also use VBA code to add borders.

Set Borders – Format Cells Dialog Box

Using the Format Cells window is the best way to add borders to cells, because it gives you access to all settings in one place, as well as a diagram preview.

1. First, (1) select a cell or a range of cells to which you want to add borders. After that, in the Ribbon, (2) go to Home and (3) click on the Borders button. From the drop-down menu (4) choose More borders.

 

add lines borders 2

 

2. The Format Cells dialog box will appear. Choose the style and color of the line, then add the borders you want. You can choose to use presets or to use individual elements such as bottom border, top border, etc. This example uses Outside Borders for the A1:C6 and a Bottom Double Border for A1:C1. The diagram preview will display every change immediately. When done, click on the OK button.

 

add lines borders 3

 

As a result, the borders will be added.

 

add lines borders 6

 

Draw Borders

Alternatively, instead of selecting the cells first and then choosing from the range of the options, you can draw borders directly on the worksheet.

1. First, in the Ribbon (1) go to the Home, then (2) click on the Borders button, and in the drop-down menu (3) choose Line Color and Line Style.

 

add lines borders 13

 

2. After that, the Draw Border mode will be activated, and the cursor will change to a pencil. Now you can start to draw individual lines.

 

add lines borders 14

 

3. To stop drawing borders, just click on the Borders button. The cursor will change back to a white cross.

 

add lines borders 15

 

Draw Multiple Borders at Once

If you don’t want to draw individual lines, under Draw Borders group commands, you can choose between two drawing modes: Draw Border or Draw Border Grid.

By choosing the Draw Border mode, you’re able to drag a pencil around the range of cells you want to engird.

 

add lines borders 16

 

If you choose Draw Border Grid mode, all cells in the selected range will have borders around them.

 

add lines borders 17

 

Set Borders in Google Sheets

1. First, select the cell or range of cells where you want to add borders.

2. In the Toolbar, click on the Borders button.

3. If you want to apply line color or type other than the default, click on the Border color button to change the color.

4. Click on Border style to change the type of the border line.

5. Finally, choose the border you want to apply.

 

add lines borders 18

 

Now the borders are added, as shown in the picture below.

 

add lines borders 19