A diagonal line in a cell is not a very common sight in Excel workbooks. Although they have a somewhat limited use, you can improve your worksheet visuals with simple tricks like this one. In this guide, we’re going to show you how to add a diagonal line to a cell in Excel and some examples for when this format can be handy.

Download Workbook

Are diagonal lines borders?

The answer is obviously, no. On the other hand, you can find the option in Border section of Cell Format dialog.

excel diagonal line

To access these options, follow the steps below.

  1. Select the cell(s) where you want to add a diagonal line
  2. Press Ctrl + 1 or open the right-click menu and open the Format Cells dialog
  3. Activate the Border tab

Excel will give you both diagonal options. Click the buttons like adding a regular border, and click OK. You can add any color and style options just like in borders to diagonal lines added this way.

Let’s now see some common use cases of diagonal lines in cells.

Indicating Disabled Cells

Marking something with an X is a common way to show the thing is not enabled or available. You can replicate this look-and-feel by doing an X with diagonal lines.

excel diagonal line

Merge cells if you want a single X for multiple adjacent cells.

Adding a diagonal line to a cell for multiple headers

This is probably the most common use of diagonal lines in Excel – splitting a cell into two for column and table headers.

excel diagonal line

To get this look, start by increasing your title row’s height to a size to fit both titles.

Add a diagonal line from the upper-left corner to lower-right.

Type in your titles by separating them with a line break. To add a line break into your cell, press Alt + Enter. You will get a view like this:

Add spaces in front of the top title to align it to the right.

You may also want to align the remaining titles to the top. To do this, select the title row and click Top Align toggle in Home tab of the Ribbon.

That’s it – Enjoy your fancy table!

Alternative multi dimension approach

If you do not want to deal with line breaks in cells and spaces, you can use multiple cells instead. However, you may still want to merge the other title cells for consistency.

Let’s see how this works on an example. Start by inserting a new row and column near the top of the left cell.

You will get to a 2 x 2 range:

Type in you titles into the lower-left and upper-right cells:

Add diagonal lines into the empty cells.

Remember to align the top title to the right for a better look.