When working with data in Excel and creating reports, it is sometimes necessary to split columns diagonally. This is useful when you want to display two different headings in the same cell, one for rows and one for columns.
When working with charts in spreadsheet software, diagonal lines are often used to divide cells to distinguish the first column heading and the top row. They can also be used to display multiple values in a cell or to create multi-value cells for audit reports.
Although you may rarely do it, drawing a diagonal line through Excel is quite simple. Here’s how to quickly insert diagonal lines into Excel cells and insert text into diagonally separated cells.
Create a diagonal line with the Border function
For example, to create a diagonal line as in the image above. Follow these instructions:
- Select the cells in the worksheet that you want to add diagonal lines.
- Set the row height to a size that can fit at least two lines of text. On the line number, click and hold the line border and then drag to change its height.
- Then, type the Name for the row in the cell. Press the keyboard key (ALT + ENTER) to create a new line, as the column Name.
- Next, right-click on the cell. Choose the “Format cells” option.
- In the dialog box that opens, select the “Border” tab.
- Then in the Border section, click the diagonal line button as in the image below. You can also click on the center of the cell image to create a diagonal line.
- Next, adjust the cell height and width by sliding the border to get a good result. You can use the space bar button to move the text to get the right position.