Home Tutorials How To Insert and Use Diagonal Lines in Google Sheets

How To Insert and Use Diagonal Lines in Google Sheets

Sometimes you may need to split cells diagonally in Google Sheets. But unfortunately, there are no default or in-built features available to insert diagonal lines in Google Sheets. However, dividing cells using Microsoft Excel is super easy.

Therefore, if you’re switching from Microsoft Excel to Google Sheets, you may face difficulties in separating headers from each other that represent a different column in Google Sheets.

But no worries, there are easy ways available in Google Sheets by which you can get a similar result to Microsoft Excel. Having said that, I’m going to let you know three different workarounds in this post about how you can put diagonal lines in Google Sheets.

So, if you’re the needful, don’t skip a single word here. All the things will be discussed from scratch to make methods easier for you. READ ON!

Methods of Inserting Diagonal Lines in Google Sheets


You can insert diagonal lines in Google Sheets using three different methods. All three methods are creative and super easy to execute. Splitting a cell in Google Sheets will not be a mammoth task anymore.

Follow the below methods step-by-step, and you’ll get a complete overview of putting diagonal lines in google Sheets.

Method 1: Insert Diagonal Lines in Google Sheets Using SPARKLINE Function


Using the SPARKLINE function to make diagonal lines in a Google Sheets cell is only preferable when you won’t have any data in the cell. Here is the SPARKLINE function below with its syntax-

= SPARKLINE(data, [options])

Well, allow me to let you know and understand all the context of the SPARKLINE function.

  • =, the equal sign, it is obvious to start a function in Google Sheets.
  • SPARKLINE(), this is the function. The function needs two attributes to work. One is data, and another is [options].
  • Data refers to the data to plot.
  • [options] indicates the optional settings that help for customizing the chart.

As you already know what the function is and the required contexts needed to work the function correctly, now let me show you a step-by-step example of this.

An Example of Using SPARKLINE Function


Here’s the step-by-step guide to inserting diagonal lines in Google Sheets using the SPARKLINE function.

Step 1: Select a Blank Cell

First, you need to select a blank cell and click on it in order to write the SPARKLINE function there. In my example, I pick cell A1.

to-insert-diagonal-lines-in-google-sheets-select-a-blank-cell-1

Step 2: Start Typing the SPARKLINE Function

Once you choose and click on your preferred cell, start typing the function. Start with an equal sign (=), as we all know, all the functions in Google Sheets begin with an equal sign. After that, type the function’s name, SPARKLINE, and an open parenthesis (.

Interestingly you don’t need to type all these things. Because when you start typing a few initial letters of the function after the equal sign, the function appears below the cell. Click on it, and you’ll get the function in the cell up to the parenthesis.

Step 3: Set the two Data Options

In this step, type an initial second bracket {, and put the value ‘1,0’, and close it with the closing second bracket }. The data refers to the sparkline chart with two data points, 1 and 0. You need to separate the data 1 and 0 using a comma ‘,’ in between them.

Step 4: Complete the Function and Hit Enter

Now, let’s complete the function by putting the contexts you need. Set your preferences of how you want to get the line in your Google Sheets.

However, in my example, I was expecting the diagonal line as black color. If you also need so, insert a second bracket {}, and put the text color and the color name within the bracket by using ” “.

Here is the result below. That’s how you can insert diagonal lines in Google Sheets using the SPARKLINE function pretty quickly. Wasn’t it easy? Well, let’s walk with me to the following method.

Method 2: Making Diagonal Lines in Google Sheets Using Drawing Tool


I’ll let you know how you can create diagonal lines in Google Sheets using the Drawing tool in this method. However, the drawing tool is a Google Sheets built-in feature.

Therefore, you can draw and customize your lines and enter them into your Google Sheets as you want. Look at the below step-by-step guide example to understand how to use the tool correctly.

Step 1: Select and Click on a Blank Cell

The first thing you need to do is, select and click on a cell you want to get the diagonal line in. In my example here, I select cell A3.

Step 2: Place the Titles in Cell with Perfect Spacing

Now add the titles (Month and Name) in the cell you pick, with spacing in between. However, place the titles accurately in the cell with perfect space between them.

For example, I set the title words far end of each corner so that space creates between them. Perfect spacing and placing between your titles will make your diagonal line more attractive.

Step 3: Open Drawing Tool in Google Sheets

Since you are all set up, now move forward and select Insert from the top menu bar in your Google Sheets. Following that, select Drawing from the resulting menu.

Step 4: Draw the Line as You Prefer

By clicking on Drawing, a box will appear to Draw the Line. Follow the below-marked section, head towards it, and click to choose Line from the dropdown.

Once you click on Line, you’ll get a box where you can draw the Line. However, you don’t need to fix the line size- small or big, here because you can resize it later.

After you complete the Drawing of your Line, click on Save and Close from the top right of your screen.

Step 5: Resize the Line According to Cell Size

The Save and Close press bring you back to your Google Sheets. And you’ll get the diagonal line in your cell. But, you’ll notice the line does not fit your cell perfectly.

Hence, it needs some customization. As I said, the diagonal line is resizable, therefore, click on the line and resize it according to your cell size.

Step 6: The Final Result of Diagonal Lines in Google Sheets

Here’s the result below. After resizing the diagonal line in the last step, it is supposed to look like this-

Method 3: Put Diagonal Lines Using Text Rotation Feature


This is the last and also an easy way to insert diagonal lines in Google Sheets. However, Text rotation is an effective Google Sheets tool for adding text and diagonal lines within a selected cell. Let’s see the step-by-step procedure below.

Step 1: Select and Click on a Blank Cell

To begin with, pick a cell where you want to insert diagonal lines, and click on it to move forward. In this below demo, A3 is that cell.

Step 2: Put the Title for Column and Row

Once your cell is selected, type the title for column and row accordingly. In my example, ‘Month‘ is the column title, and I typed ‘Name‘ for the row title.

However, you need to make space between them so that you can insert the diagonal lines in between. Therefore, press Alt+Enter simultaneously to pace the titles on top of each other.

Step 3: Create Space in Between the Titles

Again stating, make space between the titles by pressing Alt+Enter simultaneously. Don’t forget this while inserting diagonal lines in Google Sheets using Text rotation.

Step 4: Add Lines Between Two Titles

While using Text rotation to insert diagonal lines in Google Sheets, you must add a line between the two titles. And, to do that, you can use dashes. Therefore, type several ‘‘ dashes to make a line.

Well, all things are set up in your sheet, and now I’ll be moving to the Text rotation tool to make these dashes into a diagonal line.

Step 5: Open Text Rotation Tool in Google Sheets

Hover over the top toolbar of your Google Sheets, and click on Format. Following that, select Rotation and Tilt down from the resulting menus. Though you’ll get several options for rotating the text, I prefer Tilt down for my example.

Step 6: Result of Diagonal Line Using Text Rotation

When you finish the last step, you’ll get a diagonal line in your selected cell like the below one. Yes, you have the diagonal lines in your Google Sheets that you’re looking for.

N.B: The good news is that you can easily access the Text Rotation from the top toolbar. As a result, you don’t need to move here and there to get what you want. Find and click on the below-marked section from the top toolbar, and you’ll get all the options you need.

Finally, Insights


There you have it! The three different and easy methods for inserting diagonal lines in Google Sheets. Despite being straightforward and effective in all three ways, I recommend using the Drawing tool.

The reason is that the diagonal line you make using the Drawing tool will act as an image on the cell, and you can resize it easily, unlike the SPARKLINE function.

I hope this helped. Thus, you’ll be able to insert diagonal lines in Google Sheets from now onwards. So, if you find this post helpful and worth sharing, please share it with others to let them know.

I’ll be taking a break for now, and I’ll be back with another brand new Google Workspace tricks and tips.

NO COMMENTS

LEAVE A REPLY

Please enter your comment!
Please enter your name here


Exit mobile version