How To Draw Lines In Google Sheets
Those who switch from using Excel to Google Sheets often miss the fact that there is no in-built feature in Google Sheets to split cells diagonally.
Just if you withal desire to insert a diagonal line in Google Sheets, there are some workarounds that should work.
In this tutorial, I will testify yous a couple of methods to insert a diagonal line in Google Sheets.
Inserting the Diagonal Line With Text in the Jail cell
Since there is no in-built mode to insert a diagonal line in a cell in Google Sheets, permit's get a fleck creative.
Suppose I accept a dataset as shown below and I want to have a diagonal line in cell A1 so that below the line, I have the text 'Shop' and above it, I have the text 'Calendar month'
Let's run across a couple of methods to do this:
Using the Tilt Feature
While you cannot insert a diagonal line in Google Sheets, you can insert a regular horizontal line and and so tilt it to make it look like a diagonal one.
Below are the steps to utilize the Tilt feature to insert a diagonal line:
- Select the cell that you lot want to split using a diagonal line (cell A1 in this example)
- Enter the text "Calendar month" (which is the header for the first row)
- With the cell in the edit mode, concord the Alt key and printing the Enter key (Pick + Enter if using Mac). This would insert a line break and you would be able to type in the side by side line within the same cell.
- Enter a series of dashes (———-)
- Again, hold the ALT key and press the Enter key
- Enter the text "Store" (which is the header for Column A)
At this point, your prison cell would look something as shown below.
Now all y'all need to practice is tilt the content of this cell so that the horizontal line becomes diagonal.
Below are the steps to do this:
- Select the cell (A1 in this example)
- Click the Format pick in the card
- Hover the cursor over the 'Text Rotation' choice
- In the options that appear, click on 'Tilt down'
- Adjust the row height and cavalcade width appropriately (I made information technology bold, aligned the text to the middle and to the heart)
The above steps would give you lot something as shown beneath.
While this is not perfect, information technology gets the piece of work done. It gives an impression that the text above the line is the header for the row and the text below the line is the header for the cavalcade
Note: When using this technique, you can not apply a border to the cell that has the headers, as that would bear witness a tilted line in the jail cell.
Y'all can as well utilize the below formula to practise the same, where the formula will render the cell content, and so you need to tilt information technology using the same steps covered above.
= "Calendar month" & char ( 10 ) & Rept ( Char ( 8213 ) , 6 ) & char ( 10 ) & "Shop"
Cartoon a Diagonal Line and Adding the Text
Some other adept workaround to split up the cell diagonally is to manually draw a line and add it to the cell.
Suppose I have the same dataset and I want to have both the headers in jail cell A1 with a dissever diagonal line separating both headings.
Hither is how to practice this:
- In cell A1, enter the text Month
- With the cell in the Edit mode, hold the ALT key and press the Enter primal (or Selection + Enter if using Mac)
- Repeat footstep 2 a couple of times 2 or 3 more than times (to go more distance between the cursor and the word 'Month')
- Enter the text Store. This would give y'all a jail cell as shown below (with two headings and a gap in betwixt)
- Click the Insert selection in the menu
- Click on Drawing
- In the Drawing dialog box that opens, click on the 'Line' option
- Draw a diagonal line
- Click on Save and Close. This will insert the line in the worksheet
- Resize the line and identify it within the cell A1
- Adjust the position of the discussion Month in the prison cell by adding a few spaces before it
This method gives a improve-looking result equally compared to the previous tilt method.
Simply in that location is 1 drawback of this method.
The line that we have inserted is not a part of the cell but an object that sits over the worksheet. While we have resized the line to make it fit inside the cell, in instance y'all resize the cell or you hide the column or filter it, this diagonal line would not follow the cell (i.e., it would non get resized or hidden with the prison cell)
A ameliorate workaround could be to use the prototype role and insert the image of a diagonal line inside the cell.
Inserting Simply the Diagonal Line in a Bare Cell
If all you want to do is insert a diagonal line within the cell in Google Sheets, in that location is an amazing sparkline chart technique that you tin apply.
Enter the beneath formula in the cell where you desire the diagonal line, and you would become that every bit the issue.
=Sparkline({ane,0},{"color","blackness"})
The above formula creates a sparkline line chart with the cell with ii data points, 1 and 0. This is why you get a diagonal line within the jail cell.
In case you want the diagonal in the other direction, utilise the beneath formula:
=Sparkline({0,i},{"colour","black"}) Since we are using the sparkline chart, you would not be able to enter any data or use whatsoever formula to combine text with the sparkline chart formula.
The skilful matter well-nigh this method is that the line would stick with the self. So, if you hide the cell or filter the prison cell then considering the line is apart of the prison cell information technology would follow the suit.
These are some of the methods that you lot can utilise to split a cell by inserting a diagonal line in Google Sheets.
I promise you lot found this tutorial useful.
Other Google Sheets tutorials you may like:
- How to Insert Text Box in Google Sheets
- How to Change Text Case in Google Sheets (Upper, Lower, or Proper)
- How to Wrap Text In Google Sheets (with a unmarried click)
- How to Indent Text in Google Sheets
Related posts:
Source: https://spreadsheetpoint.com/insert-diagonal-line-google-sheets/
Posted by: marcucciancessitere.blogspot.com

0 Response to "How To Draw Lines In Google Sheets"
Post a Comment