How many ways can you underline in Google Sheets?
There are three broad approaches when seeking to emphasise text in Google Sheets by applying underlines. These three approaches are: underlying specific or whole text in the cell, underlying the whole cell itself with different styles, or using underscore characters.
Here is each approach with examples below:
Underline Specific Text
The most common approach to underlying text in a cell in Google Sheets is to use the keyboard shortcut
Cmd + U (or
Ctrl + U for Windows). If you have selected text within the formula bar and apply this keyboard shortcut while having text highlighted, it will underline just the selected text as shown here:
The same keyboard shortcut can also be used when the active cell is selected (instead of specific text in the active cell). However, using this technique on an active cell will highlight all text in the cell, as shown below:
This same outcome also happens when using the format menu. Selecting Format > Text > Underline from the menu only underlines the complete cell. Using the menu doesn’t allow you to underline specific text within the cell because when you click outside of the formula bar the active selection is lost.
Undo Underline On Text In Cell
To remove the specific text that has already been underlined, click on the text in the formula bar so that it is actively selected and then use the keyboard shortcut
Cmd + U (or
Ctrl + U) keys again.
When clicking on an underlined word and hitting
Cmd + U (or
Ctrl + U), the text will have its underline removed, as shown below:
Another way of removing the underlined text or cell, especially if it was the last action performed, is to use the handy keyboard shortcut of undo, which is
Cmd + Z (or
Ctrl + Z) shortcut to undo the previous action.
Underline Whole Cell Width Using Borders
A very popular option for underlining a cell, especially when there is no text in the cell, or if you want to extend the length of the underline, is to apply a border to the cell instead.
This is a common approach when underlying headers, or emphasising totals in your spreadsheet.
To create an underline spanning cells, select the cells you want to underline and then use the border button, like so:
While this approach helps by making your spreadsheet look professional another useful aspect of this technique is that it enables you to apply styling to the way the cell is underlined. Styling your cells helps to emphasise the content above the cell and provides more spacing between the content and the underline. For example, totals could be emphasised with a double underline or a dotted underline for sub-totals.
Here is how you can modify the underline style:
Apply Different Underline Styles On Same Cell
If you want to apply different underline styles on the same cell, such that the upper border is a single underline style and the bottom border is a double underline style.
Start by clicking the cell you want to apply the different styles to, then click on the border button, click the border style first and finally click on where you want that style to be.
Navigate away from the active cell to confirm the first style has been applied correctly:
Click back on the same cell to apply the second style. Just as before, click on the border button, then on the style first, before clicking on the border to apply the selected style. With the second style I am applying the double underline pattern:
Navigate away from the active cell to clearly see how the style has performed:
Remove All Underline Styles
If you’ve found that the border style has been incorrect, select the cells you want to remove borders from, click the border button and then click the border labelled Clear borders, like so:
Underline With Underscore
There is another technique to apply an underline-like style to your text in Google Sheets, and it’s the old method of using the underline character.
You can use the underscore character when creating worksheets for students, math and English questions perhaps being the most popular type, or should an underline be needed but is the result of a formula as the keyboard underline shortcut can be used on formulas.
However, the biggest difference between the underline and using the underscore character is that the underscore character can accept styling, such as bolding, as seen below with the same cell content but the first uses the underscore and is bolded, whereas the second uses the keyboard technique applied on space characters:
As you can see from the above, cell
A1 contains the underscore character, and the entire cell is bolded, whereas the second cell contains space characters that have been underlined and even though the entire cell is underlined the line is thinner.
This approach helps when you need to display an underlined area that is part of a formula, as you cannot apply an underline to a section containing a formula. Here is an example demonstrating the same content using the formula
=REPT("_", 8)&" x = 25"
As you cannot apply the keyboard underline on any portion of a cell containing a formula the underscore character can be an excellent substitute:
This technique is helpful only when you want to display a blank underline area.
The three methods of underlining in Google Sheets are using a keyboard shortcut, applying a border to the entire cell or using the underscore character.
The keyboard shortcut
Cmd + U (
Ctrl + U) is popular as it allows for underlining specific text in a cell and is quickly performed.
The border method is popular for enabling different styles like the double underline or dashed underline or dotted underline.
The third method uses the underscore character and is popular when defining a blank underlined area that is the product of a formula.