3 Different Ways To Underline In Google Sheets: Shortcuts, Borders & Formulas

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:

Underline specific text by highlighting the text in the formula bar and then using the keyboard shortcut Cmd + U ( Ctrl + U )

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:

Using the same keyboard shortcut on an active cell highlights all text in the cell

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.

You can underline all text in the active cell by using the Format menu Text and then Underline

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:

Undo the underlined word “random” in the cell by selecting it and using the keyboard shortcut method again

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:

After selecting the cells click on the border button and click on the border that matches where you want the underline to go

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:

To create a double-underline, change the style by clicking on the style border button and selecting from the options available

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 .

Choose the first style by clicking on the style first then where the style is to be applied

Navigate away from the active cell to confirm the first style has been applied correctly:

Check the border has been applied correctly by navigating away from the active cell, as you can see C5 has the correct style

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:

Click back on the previous cell C5 and then perform the same process but selecting a different style

Navigate away from the active cell to clearly see how the style has performed:

Navigate away from the active cell in C5 and check the styling has worked appropriately

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:

Click on Clear styles button to remove all border styles

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:

Same content with the top using underscores and the bottom using spaces with underlining applied

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(text, num_times) :

=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:

If you need to show an underlined blank area using a formula combine the underscore character _ with the formula REPT()

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.

Photo of author
Ryan Sheehy
Ryan has been dabbling in code since the late '90s when he cut his teeth exploring VBA in Excel. Having his eyes opened with the potential of automating repetitive tasks, he expanded to Python and then moved over to scripting languages such as HTML, CSS, Javascript and PHP.