How To Insert Diagonal Line In Cell In Google Sheets (2022)

Written by Abid Akon

Here's what we'll cover:

Diagonal lines are tools used to separate headers representing different columns from each other. Unlike Microsoft Excel, there isn’t an inbuilt feature for creating diagonal lines in Google sheets. Therefore, we are going to improvise on a few ways to insert diagonal lines in cells.

There are three known methods used to insert diagonals in cells and each method would be explained in detail to improve understanding. 

The sample worksheet below does not have headers to indicate the dataset in column A to column M. We would insert diagonals in A1 to separate the headers of each data set.

Method 1: Insert a Diagonal line Using the Tilt feature.

This feature is employed when you want to divide your cell into two parts. For instance, if a cell contains two headers or titles and you want to separate them to represent their respective columns, the tilt feature is used. 

Step 1: Select the row you want to dissect.

1 How To Insert Diagonal Line In Cell In Google Sheets

Step 2: Press the Alt + Enter simultaneously on your keyboard. This causes a line break between the two headers.

2 How To Insert Diagonal Line In Cell In Google Sheets

Step 3: Type in multiple dash lines.

3 How To Insert Diagonal Line In Cell In Google Sheets

Step 4: Press Alt + Enter again on the keyboard to cause another line break.

Step 5: Type the second title below the dash lines.

4 How To Insert Diagonal Line In Cell In Google Sheets

Step 6: Select cell A1.

5 How To Insert Diagonal Line In Cell In Google Sheets

Step 7: Click on Format on the toolbar.

6 How To Insert Diagonal Line In Cell In Google Sheets

Step 8: Click on Rotation.

7 How To Insert Diagonal Line In Cell In Google Sheets

Step 9: You can click on either the tilt up or tilt down option, depending on the direction you want your diagonal to face.

8 How To Insert Diagonal Line In Cell In Google Sheets

Step 10: Click on tilt-up and it produces the results as seen below.

9 How To Insert Diagonal Line In Cell In Google Sheets

Alternatively:

You have to follow previous 6 step then start 7 from here

Step 7: Click on the three dots arranged horizontally on the toolbar.

10 How To Insert Diagonal Line In Cell In Google Sheets

Step 8: You can click on the cell rotation icon on the toolbar.

11 How To Insert Diagonal Line In Cell In Google Sheets

Step 9: You can select the tilt up or tilt down option or click on the degree icon to select the angle of tilt and direction you want your diagonal line and headers to face.

12 How To Insert Diagonal Line In Cell In Google Sheets

If you click on the degree icon, it displays a list of degrees with negative and positive values.

13 How To Insert Diagonal Line In Cell In Google Sheets

Method 2: Drawing a Diagonal line and Add the text.

Although this technique has a few disadvantages, the drawing method is particularly easy to learn and understand with the following steps below.

Step 1: Click on Insert.

14 How To Insert Diagonal Line In Cell In Google Sheets

Step 2: Select Drawing.

15 How To Insert Diagonal Line In Cell In Google Sheets

Step 3: Click on the drop-down arrow.

16 How To Insert Diagonal Line In Cell In Google Sheets

Step 4: Select the Line option here.

17 How To Insert Diagonal Line In Cell In Google Sheets

Step 5: A page is shown on the sheet. Draw a diagonal line across the sheet.

18 How To Insert Diagonal Line In Cell In Google Sheets

Step 6: Click on the Line Weight icon.

19 How To Insert Diagonal Line In Cell In Google Sheets

Step 7: Increase the line weight to about 16px to improve the thickness and visibility of the line.

20 How To Insert Diagonal Line In Cell In Google Sheets

Step 8: Click on Save and Close.

21 How To Insert Diagonal Line In Cell In Google Sheets

Step 9: Press Enter on the keyboard and the line would appear on the worksheet.

22 How To Insert Diagonal Line In Cell In Google Sheets

Step 10: Using the mouse, click on the sides of the diagonal and drag it in. The diagonal line size is decreased to fit into the cell.

23 How To Insert Diagonal Line In Cell In Google Sheets

Step 11: Adjust the diagonal line to fit properly into the row.

Step 12: Type in the respective headers in the cell above and below the diagonal line to indicate the columns.

24 How To Insert Diagonal Line In Cell In Google Sheets

You can also create another diagonal with this method in case you want to make an X which can be used for the cancellation of data in a cell.

25 How To Insert Diagonal Line In Cell In Google Sheets

Note: This technique has a few disadvantages.

  1. The line is not placed in the cell but over the cell. It doesn’t become part of the cell component.
  2. When additional editing or tools are used on the sheet such as Zoom, it only affects the worksheet, leaving the diagonal line unaffected

Due to the disadvantages listed above, it is not considered the best method for inserting diagonal lines in cells but it does serve its purpose as a diagonal line and gives a better-looking result than the tilt method.

Method 3: Insertion of Diagonal lines in Blank Cell Using the Sparkline Function.

This method is specifically used when you want to insert a diagonal line in a blank cell. The sparkling function is used to create miniature charts in Google sheets. With the formula below, one can create a chart consisting of only one diagonal line.

=SPARKLINE({1,0},{“color”, “black”})

This formula would be used to put a diagonal line into the blank cell.

Step 1: Input the formula into the blank cell.

26 How To Insert Diagonal Line In Cell In Google Sheets

Step 2: Click Enter

Step 3: A diagonal line is displayed in cell A1 of your worksheet.

27 How To Insert Diagonal Line In Cell In Google Sheets

Note: You can also change the direction and color of the diagonal by swapping the 1, 0 to 0, 1 and changing the color ” black” to “yellow” or any color of choice in the formula. The formula looks like this:

=SPARKLINE({0,1}, {“color”, “yellow”})

28 How To Insert Diagonal Line In Cell In Google Sheets

This method is considered the fastest and best method because the formula makes the diagonal line become a part of the cell, unlike the two previous methods which mean that whatever filter or edit is done on the cell, the diagonal line would be affected too.

Final Thoughts:

Although the diagonal line feature is temporarily absent in Google sheets, with the above steps and detailed explanation, this has been made easy for both beginners and intermediate google sheets users. 

Put in the required effort and practice and you would become a master in all three methods. I hope you enjoyed this tutorial, thank you.

Abid Akon

Abid Akon

I am a tech content writer. I really love to talk about different Modern Technology. It is very important that people know how to fix their tech related problem. That’s why I am writing articles to share my tech knowledge with you.

Related Articles

MD Abid Akon

Abid Akon

Hi, I am Abid. I really love to talk about different Modern Technology. It is very important that people know how to fix their tech related problem. That’s why I’ve created this website to share my technology keeping knowledge with you. Welcome to ”abidakon.com”

Abid Akon

My Personal Favorites
YouTube Channel