How to Put a Diagonal Line in Google Sheets


There are different ways you can split the cells diagonally in your Google Sheets and we’ll see all these different methods here in this article. So let’s begin. Drawing a Line

Drawing a Line

Steps to draw a diagonal line in your spreadsheet:

  • From the menu bar, click on insert and then select drawing option.
drawing diagonal-1
  • A new drawing tab will open and from there select Line.
drawing diagonal-2
  • To draw a line inside the drawing screen, click and hold while dragging your cursor. It’s possible that you’ll need to resize the line to make it go from one corner to the other. You can modify the thickness of your line after it has been formed by selecting the Line weight option and increasing the px of the line. You’ll need to do this to see the line in a cell clearly.
drawing diagonal-3
  • Now, after customizing the line according to your need click on Save and Close.
drawing diagonal-4
  • 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 and you’ll be done.
drawing diagonal-5

After resizing you will get results like :

drawing diagonal-6

You may also x out a cell using this method by drawing two diagonal lines that make an X and inserting it in the cell.

However, the disadvantage of this method is that the line you’ve drawn isn’t actually within the cell; instead, it sits on top of the sheet and gets resized. It’s also a time-consuming process if you have a lot of cells to insert the line in.

Tilt Format

To perform this, follow these steps-

  • I’m going to make a diagonal line to divide two lines of text in this example. To begin, select the cell you want to work on and move your mouse to the end of the cell’s word. Then, on your keyboard, press Alt and Enter (Option + Enter on a Mac). The cell will now have a line break.
diagonal tilt-1
  • Next, type a series of dashes on your keyboard to make a dashed line (-). When you’re finished, use Alt + Enter to add another line break.
diagonal tilt-2
  • If you want your words to be separated by a line, type your second word next.
diagonal tilt-3
  • After you have your words and line in your cell, select the cell.
diagonal tilt-4
  • Select Text rotation from the top toolbar, then Tilt down or Tilt up from the drop-down menus. Select Format>Text rotation>Tilt up or down from the format menu.
diagonal tilt-5
  • Your dashed line will become a diagonal line, and the contents of your cell will be tilted.
diagonal tilt-6

Although this method is not perfect, you can see that we have effectively constructed a diagonal line. Depending on why you need this line in your cells, this could be a viable workaround.

SPARKLINE Function

The SPARKLINE function is another excellent alternative for inserting a diagonal line in your spreadsheet.
SPARKLINE makes a small chart within a single cell based on the parameters entered into the function.
We’ll essentially be utilising the function to construct a chart with a simple diagonal line to use it to generate a diagonal line.
Here’s how to use the SPARKLINE function to make a diagonal line:

=Sparkline({1.0},{“color”,”red”})

Sparkline diagonal

By switching the positions of the 1 and 0 in the formula, you may vary the direction of the line. You can also modify the color by writing a new color where I’ve written “red.”

Sparkline diagonal-2

The three methods for drawing a diagonal line in Google Sheets are as follows. Neither solution is flawless, but they are the best workarounds that are currently available.

To obtain a better grasp of how each approach works, try to complete each one in your own spreadsheet.

Harshita Mathur

My name is Harshita Mathur. I come from Jaipur, Rajasthan. I am a law student. Apart from this I am an amateur writer.

Recent Content