Tip: Other languages are Google-Translated. You can visit the English version of this link.
Log in


How to quickly insert diagonal line in a cell?

When we process some tasks in Excel, sometimes we may need to insert diagonal line in a cell for creating a table in Excel. You can insert diagonal line in Excel as follows:

Insert one diagonal line with Border function

Insert two or more diagonal line with drawing lines

Insert multiple diagonal lines in a cell with a handy tool

good ideaDelete Blank Rows

Kutools for Excel's Delete Blank Rows utility can quickly remove blank rows from selection, current sheet, select sheets or the entire workbook as you need.
doc delete blank row

arrow blue right bubbleInsert one diagonal line with Border function

formula Never need to worry about long long formulas in Excel anymore! Kutools for Excel's Auto Text can add all formulas to a group
as auto text, and liberate your brain! Click here to know Auto Text     Click here to get free trial

With the border function in Excel, you can quickly insert a diagonal line in a cell. Please do as follows:

1. Click the cell that you want to place the diagonal line.

2. Right-click and choose Format Cells in the menu, and a Format Cells dialog box will pop out. Then click Border on the top ribbon, and click the diagonal line, you can preview it from the box. See screenshot:


3. Then click OK. And the diagonal line has been inserted into the cell.

4. Then you can enter the text into the diagonal line cell. Enter the first text into the cell, and then press Alt + Enter to change the line and enter the second text. Then you can press the Space bar to put the text at the right location that you want.


arrow blue right bubbleInsert two or more diagonal line with drawing lines

With the above method, you can only insert one diagonal line, if you want to insert two or more, you can do as the following steps:

1. Select the cell you would like to add the diagonal lines.

2. Click Insert > Shapes, and select a line shape.

3. Then draw the lines that you need. See screenshot:


4. Then enter the text into the cell as the first method step 4. See screenshot:


arrow blue right bubble Insert multiple diagonal lines in a cell with a handy tool

Actually, you can use a handy tool – Kutools for Word to insert diagonal lines in a table than copy it to the Excel cell.

Kutools for Excel, with more than 120 handy Excel functions, enhance your working efficiency and save your working time.

After free installing Kutools for Word, please do as below:

1. Open a Word document, click Insert > Table, and select a square to inter a table with one cell. See screenshot:

doc insert diagonal 1

2. Then click Enterprise > Diagonal Header, and select the type you need under Diagonal Table Header Style section from the popping dialog, see screenshots:

doc insert diagonal 2
doc insert diagonal 3

3. Then click OK, and click the cross button to select the whole table, and press Ctrl + C to copy it, and go to a cell of Excel, press Ctrl + V to paste the table into cell, then you can drag and resize the lines see screenshots:

doc insert diagonal 4

4. If you want to add text into it, click Insert > Text Box then type the text header you need. Repeat this step to add all headers into the cell.

doc insert diagonal 8
doc insert diagonal 6

With Kutools for Word, you can remove all breaks, all blank lines, select all heading paragraphs, all tables, batch convert doc and docx, export all comments and so on. Click here you can have a free trial for Kutools for Word.

Advanced to Kutools for Word, if you usually work with Excel, the Kutools for Excel must can help you solve many tasks. With Kutools for Excel, you can combine multiple worksheets (across workbooks) into one workbook or on worksheet, merge data without losing data, insert unique random data and so on.

Transpose Table Dimensions(transpose a cross table to list, and vice versa.)

doc transpose cross to list

Recommended Productivity Tools

Office Tab

gold star1 Bring handy tabs to Excel and other Office software, just like Chrome, Firefox and new Internet Explorer.

Kutools for Excel

gold star1 Amazing! Increase your productivity in 5 minutes. Don't need any special skills, save two hours every day!

gold star1 200 New Features for Excel, Make Excel Much Easy and Powerful:

  • Merge Cell/Rows/Columns without Losing Data.
  • Combine and Consolidate Multiple Sheets and Workbooks.
  • Compare Ranges, Copy Multiple Ranges, Convert Text to Date, Unit and Currency Conversion.
  • Count by Colors, Paging Subtotals, Advanced Sort and Super Filter,
  • More Select/Insert/Delete/Text/Format/Link/Comment/Workbooks/Worksheets Tools...

Screen shot of Kutools for Excel

btn read more      btn download     btn purchase

Say something here...
symbols left.
You are guest ( Sign Up? )
or post as a guest, but your post won't be published automatically.
People in conversation:
Loading comment... The comment will be refreshed after 00:00.
  • To post as a guest, your comment is unpublished.
    Laine · 6 months ago
    This is great and all, but what about for Excel ONLINE? I don't have the desktop version, I use the free online version with one drive.
    • To post as a guest, your comment is unpublished.
      Sunny · 6 months ago
      Do you mean the Google Sheet? If so, sorry I do not know how to solve it.
  • To post as a guest, your comment is unpublished.
    Ramu · 2 years ago
    Good information
  • To post as a guest, your comment is unpublished.
    lisa · 2 years ago
    Thanks - but why does diagonal lines in excel show up crooked? They have rough edges and I'm having a difficult time having a smooth straight line.
  • To post as a guest, your comment is unpublished.
    Shakti Pravesh · 4 years ago
    It's good Idea. But cann't we split a cell diagonally?