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

Written by

Editorial Team

Reviewed by

Laura Tsitlidze

Last updated on October 28, 2022

This tutorial demonstrates how to add border lines in Excel and Google Sheets.

 

add lines borders 10

 

Set Borders From the Ribbon

A border is a line – set over the gridline – around a cell or range of cells. You can use it to emphasize certain data, separate different sections, etc. Worksheets 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 the cell or range 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

 

  1. 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 (here, 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 the cell or a range of cells to which you want to add borders. Then 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

 

  1. The Format Cells dialog box appears. 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 displays every change immediately. Check that the preview matches the borders you want, and click OK.

 

add lines borders 3

 

As a result, the borders are 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 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

 

  1. After that, the draw border mode is activated, and the cursor changes to a pencil. Now you can start to draw individual lines.

 

add lines borders 14

 

  1. To stop drawing borders, just click on the borders button. The cursor changes 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 Shortcut

You can also use a keyboard shortcut to add a single border around a range of cells.

  1. Select the range of cells.

 

setborder select cells

 

  1. Press CTRL + SHIFT + &.
  2. An outside single border is placed around the selected cells.

 

setborder keyboard

 

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 the borders button.
  3. If you want to apply line color or type other than the default, click the border color button to change the color.
  4. Click border style to change the type of border line.
  5. Finally, choose the border(s) you want to apply.

 

add lines borders 18

 

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

 

add lines borders 19

AI Formula Generator

Try for Free

See all How-To Articles