How to Split a Cell Diagonally in Excel (Insert Diagonal Line)

When working with data in Excel and creating reports/dashboards, sometimes you would have a need to split a cell diagonally.

This is helpful when you want to show two separate headings within the same cell – one for the row and one for the column (as shown below in cell A1).

Dataset with cell that has a diagonal line

And being the super awesome spreadsheet tool that Excel is, there is an inbuilt way to easily insert a diagonal line within a cell in Excel.

In this tutorial, I would show you how quickly split a cell diagonally in Excel.

So let’s get started!

Inserting a Diagonal Line in Excel

Suppose you have a data set as shown below and you want to insert a diagonal line in cell A1.

Dataset where the cells need to be split with a tilted line

Below are the steps to do this:

  1. Select the cell in which you want to insert the line (which is cell A1 in our example)
  2. Click the Home tabClick the Home tab
  3. In the Font group, click on the dialog box launcher icon (the small, tilted arrow at the bottom right of the group)Click on the dialog box launcher
  4. In the Format cells dialog box, click on the ‘Border’ tabClick the Border tab
  5. In the Border section, click on the diagonal line icon at the bottom right of the section (as shown below). This will also show you the live preview of how the cell would look likeClick on the diagonal line icon
  6. Click Ok

The above steps would insert a diagonal line within the selected cell. In case you have selected multiple cells, this would insert the diagonal line in all the selected cells.

Result when diagonal line is inserted

You can also customize the line that is inserted.

For example, you can choose the thickness of the line or the color of the line that should be inserted in the cell. The setting is right there in the format cells dialog box within the border group (as highlighted below).

You first need to make the Style and Color selections (if needed) and then click on the diagonal border icon.

Style and Color option for border

You can also use the same method to insert a diagonal line in merged cells.

Now that we have the diagonal line in the cell, all you have to do is insert the text for the two headers and space it out a little bit to make it look as if it’s separated by the tilted line.

Let’s say I want to insert the header ‘Month’ at the top and ‘Country’ at the bottom within the same cell.

Below are the steps to do this:

  1. Select the cell that already has the diagonal line
  2. Double click on the cell, or press the F2 key on your keyboard to get into the edit mode
  3. Enter the text ‘Month’ (which is the header title for the first row)Enter Month in the cell
  4. While still being in the edit mode, hold the ALT key and press the Enter key (or Option + Enter key if you’re using Mac). This will insert a line break and take your cursor to the next line within that same cell
  5. Enter the text ‘Country’ (which is the header title for the first column)Enter country in the next line
  6. Adjust the formatting (such as make it bold, align text to the left, increase the row height), and add some space characters before the ‘Month’ header to push it a little to the rightDataset with cell that has a diagonal line

The above steps would insert two headers in the same cell and make it appear that these are being divided by a diagonal line.

Also read: Get New Line in Cell in Excel

How to Remove the Diagonal Line in the Cell

If you want to get rid of the line within the cell, just follow the same steps and you can remove it in the same Format Cells dialog box.

In the Border tab, click on the None option in the Presets and then click on OK.

None option to remove the border

This will make the diagonal line go away.

So this is how you can easily split the cells diagonally in Excel by inserting a line using the format cells dialog box options.

I hope you found this tutorial useful.

Other Excel tutorials you may also like:

Excel Ebook Subscribe

FREE EXCEL BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

Sumit Bansal
Hello there! I'm Sumit Bansal, founder of trumpexcel.com and an Excel MVP. I started this website in 2013 with a simple goal: to share my love for Excel through easy to follow tips, tutorials and videos. I'm here to help you get the best out of MS Excel to save time and boost your productivity.

Leave a Comment

Free-Excel-Tips-EBook-Sumit-Bansal-1.png

FREE EXCEL E-BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

Free-Excel-Tips-EBook-Sumit-Bansal-1.png

FREE EXCEL E-BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster

Free Excel Tips EBook Sumit Bansal

FREE EXCEL E-BOOK

Get 51 Excel Tips Ebook to skyrocket your productivity and get work done faster