Add Horizontal and Vertical Lines in Excel Cells

Adding horizontal and vertical lines in particular cells of your data set can improve the readability of your data. This tutorial explains how to add horizontal and vertical lines in Excel cells.

We can add horizontal and vertical lines in Excel cells using three methods. We can use the Borders drop-down list, use the Format Cells dialog box, and manually draw the lines.

Example

We will use copies of the following data set in our illustrations:

How to add horizontal lines to Excel cells

We will explain the three methods of adding horizontal lines.

Method 1: Use the Borders drop-down list

  1. Drag the mouse over range B3:E3 to select it.
Table

Description automatically generated
  1. Click Home >> Font >> Borders Arrow >> Top and Bottom Border.

Horizontal lines are added to the top and bottom of the cells in the selected range B3:E3.

  1. Drag the mouse over range B13:E13 to select it.
  1. Click Home >> Font >> Borders Arrow >> Top and Double Bottom Border.

A single line is added to the top of the cells in the selected range B13:E13. A double line is added to the bottom of the cells in the range.

Method 2: Use the Format Cells dialog box

  1. Drag the mouse over range B3:E3 to select it.
  2. Click Home >> Cells >> Format >> Format Cells to open the Format Cells dialog box.

Or

Right-click the selected range and click Format Cells on the shortcut menu.

Or

Press Ctrl + 1 on the keyboard.

  1. Do the following five things in the Format Cells dialog box that pops up, in the numbered order:
  • Choose the style of line you want from the Style box.
  • Choose the color you want for the line from the Color drop-down list.
  • Click the top border in the Border section.
  • Click the bottom border in the Border section.
  • Click the OK button to apply the top and bottom horizontal lines.
Table

Description automatically generated
  1. Drag the mouse to select range B13:E13.
  2. Repeat steps 2 and 3 but this time choose a single line style for the top line and a double line style for the bottom line.
Table

Description automatically generated

Method 3: Draw the lines manually

We use the Draw Borders feature of Excel to draw the lines. The Draw Borders options are listed at the bottom of the Borders menu.

We use the followings steps to draw the horizontal lines:

  1. Choose the line style you want to use.
  1. Choose the line color.
Graphical user interface, application, table, Excel

Description automatically generated
  1. Click Draw Border.

The mouse pointer changes to a pencil icon.

  1. Drag and draw single lines along the grid lines on top and bottom of range B3:E3.
  1. Drag and draw a single line along the gridline on top of range B13:E13.
Table

Description automatically generated
  1. Repeat step 1 but choose a double line style.
Graphical user interface, application, table, Excel

Description automatically generated
  1. Drag and draw a double line along the gridline at the bottom of range B13:E13.
Table

Description automatically generated

How to add vertical lines to Excel cells

Method 1: Use the Borders drop-down list

  1. Select range E3:E13.
  1. Click Home >> Font >> Borders Arrow >> Left Border.
  1. Click Home >> Font >> Borders Arrow >> Right Border.

Vertical lines are added to the left and right of the selected range.

Table

Description automatically generated

Method 2: Use the Format Cells dialog box

  1. Select range E3:E13.
  2. Open the Format Cells dialog box as previously explained in this tutorial.
  3. Select appropriate options in the dialog box. Choose the left and right border in the Border section and click the OK button.

Vertical lines are applied to the right and left of the selected range.

Table

Description automatically generated

Method 3: Draw the lines manually

  1. Choose the line style you want to use.
  1. Choose the line color.
Graphical user interface, application, table, Excel

Description automatically generated
  1. Click Draw Border.
Graphical user interface, application

Description automatically generated

The mouse pointer changes to a pencil icon.

  1. Drag and draw a vertical line along the gridline on the left of range E3:E13.
  1. Drag and draw a vertical line along the gridline on the left of range E3:E13.

Conclusion

Add horizontal and vertical lines to the cells you want to draw attention to in your dataset. This makes your data more readable.

We can add horizontal and vertical lines in Excel cells using three methods. We can use the Borders drop-down list, use the Format Cells dialog box, and manually draw the lines.

Tomasz Decker is an Excel specialist, skilled in data analysis and financial modeling.