Skip to Content

How to Put a Diagonal Line in Google Sheets

In Microsoft Excel, you can split cells diagonally, but there is not a way currently to do this in Google Sheets.

If you are trying to accomplish this in Google Sheets, there are a couple of things you can do to get something similar.

In this tutorial, I will show you a few ways how to put a diagonal line in Google Sheets.

Table of Contents

How to Insert a Diagonal Line in Google Sheets

I am going to cover three different ways you can place a diagonal line inside Google Sheets:

  1. Drawing a line
  2. Using Tilt Format
  3. Using the SPARKLINE function

Drawing a Line

One of the simplest methods for creating a diagonal line is to draw one through Insert Menu and place it inside your cell.

Here are the steps to draw a diagonal line in your spreadsheet:

1. In the top menu select Insert and then select Drawing 

drawing diagonal-1

2. The Drawing tab should open in your sheet. Select Line in the toolbar.

drawing diagonal-2

3. Click and hold while dragging your cursor to create a line inside the drawing screen. You may have to resize the line so that it goes from one corner to another. After your line is created, you can change the thickness of your line by selecting the Line weight option and increasing the px of the line. You will need to do this to see the line clearly in a cell

drawing diagonal-3

4. After your line is created and you have adjusted the line to make it thicker, select Save and Close

drawing diagonal-4

5. You will now see the line you have drawn inside your spreadsheet. You will need to move this line and resize into the cell where you want the line to be

drawing diagonal-5

6. After you have moved the line inside a cell and resized it, you can end up with a result that looks like this:

drawing diagonal-6

You can also use this method to x out a cell by placing drawing two diagonal lines that form an X and place it in the cell.

The drawback of this method is that the line you have created is not really inside the cell, it sits over the top of the sheet and the size is adjusted. It is also a tedious process if you have many cells that you want to place the line inside.

Using Tilt Format

Another option to place a diagonal line inside the cell is to create a dashed line and use tilt format to rotate the line.

Here are the steps to do this:

1. In this example I am going to create a diagonal line to divide two lines of text. So first select the cell you wish to perform this on and bring your cursor to the end of the word in the cell.  Then press Alt and Enter on your keyboard (Option + Enter on a Mac). This will create a line break in the cell

diagonal tilt-1

2. Next, create a dashed line by typing a bunch of dashes on your keyboard (-). Insert another line break (Alt + Enter) when you are done with this

diagonal tilt-2

3. Next, type your second word if you wish to have words divided by your line

diagonal tilt-3

4. After you have your words and line in your cell, select the cell

diagonal tilt-4

5. In the top toolbar select Text rotation and then select either Tilt down or Tilt-up. You can also do this through the format menu by selecting Format>Text rotation>Tilt up or down

diagonal tilt-5

6. This will tilt the contents of your cell, and your dashed line will turn into a diagonal line

diagonal tilt-6

This is not a perfect method, but you can that we have essentially created a diagonal line. This might be a good workaround depending on your reasons for wanting this line in your cells.


Another great option for inserting a diagonal line in your spreadsheet is by using the SPARKLINE function.

I am not going to go into too much detail on how to use this function, but what SPARKLINE does is creates a mini chart within a single cell according to the parameters specified within the function.

To use it to create a diagonal line, we will essentially be using the function to create a chart with a simple diagonal line.

Here is the formula to create a diagonal line with the SPARKLINE function:


Sparkline diagonal

You can change the direction of the line by swapping the locations of the 1 and 0 in the formula. You can also change the color by writing a different color in place of where I have “red’ written.

Sparkline diagonal-2

Closing Thoughts

Those are the three methods for creating a diagonal line in Google Sheets. Neither method is perfect, but they are the best workarounds currently available for accomplishing this.

Try to do each one inside your own spreadsheet so that you gain a better understanding of how each method works.

Related Posts:
How to Use Paint Format in Google Sheets
Adding Gridlines and Borders in Google Sheets