Underlining in Google Sheets: A Detailed Guide

Underline Text or the entire cell with Methods like Formatting, Borders, Conditional Formatting, CHAR Function, and the Google Apps Script.


Create a free BoloForms account today!

Create your free account today and start enhancing your sheets using BoloForms SheetGod.

How to Underline in Google Sheets

Google Sheets is a powerful tool for organizing and analyzing data. While it offers a variety of formatting options, underlining a cell is not as straightforward as it may seem. In this blog post, we'll explore different methods to underline a cell in Google Sheets using code blocks for formulas.

Method 1: Using Text using the Formatting Menu

If you want to underline the entire text in a cell, you can do that using the below steps:

Step 1: Select the cell that you want to underline (or a range of cells)

Step 2: Click the Format menu option.

Underline Text in Google Sheets

Step 3: Click on the ‘Underline’ option

Under Line Text in Google Sheets from Format

The above steps would automatically underline the entire text in the cell (or the range of cells) that you have selected.

Method 2: Using the Border Feature

In some cases, you may not want to underline the text but the entire cell.

Below are the steps to Google Sheets underline a single cell

Step 1: Select the cell that you want to underline (in case you select a range of cells, only the bottom ones would be underlined)

Step 2: Click the cell borders icon in the toolbar

Use Border Feature to underline Cells in Google Sheets

Step 3: Click on the bottom border option

Use Border Feature to underline Cells in Google Sheets

This would give a bottom border to the cell, which looks as if you have underlined the cell. You can follow the same steps as a method of how to get rid of an underline in Google Sheets.

Method 3: Using Conditional Formatting

Conditional Formatting in Google Sheets allows you to apply formatting rules to cells based on specific conditions. By leveraging this feature, you can create a rule to underline cells that meet certain criteria.

To underline a cell using Conditional Formatting, follow these steps:

  1. Select the cell or range of cells that you want to underline.
  2. Go to the Format menu and click on "Conditional formatting."
  3. In the Conditional format rules pane, select "Custom formula is" as the format rules.
  4. Enter the following formula in the input field:graphql
    =TRUEThis formula always evaluates to true, ensuring that the formatting rule is applied to the selected cell(s).
  5. Click on the "Text decoration" dropdown and choose "Underline."
  6. Customize any additional formatting options as desired.
  7. Click "Done" to apply the Conditional Formatting rule.

The selected cell(s) will now be underlined based on the specified formatting rule.

Method 4: Using the CHAR Function with Cell Formatting

Google Sheets provides the ability to use the CHAR function to generate special characters. By combining the CHAR function with cell formatting options, you can effectively underline a cell.

To underline a cell using the CHAR function, follow these steps:

  1. Select the cell that you want to underline.
  2. In the formula bar, enter the following formula:
    Replace A1 with the address of the cell, you want to underline.
  3. Press Enter to apply the formula.
  4. Select the cell containing the formula and go to the Format menu.
  5. Click on "Number" and select "Plain text" to remove any number formatting.
  6. Manually adjust the row height if necessary to accommodate the underlined text.

The selected cell will now display underlined text based on the formula and formatting applied.

Method 5: Using Google Apps Script

If you're comfortable with scripting, you can use Google Apps Script to underline cells in Google Sheets. Here's an example of a custom script that underlines a cell:

1.Open your Google Sheets document.

2. Go to the "Extensions" menu and click on "Apps Script."

3. In the Apps Script editor, replace any existing code with the following script:

function underlineCell() { var sheet = SpreadsheetApp.getActiveSpreadsheet().getActiveSheet(); var cell = sheet.getActiveCell(); cell.setBorder(true, true, true, false, false, false, "underline", SpreadsheetApp.BorderStyle.SOLID); }

Underline Cells in Google Sheet

4. Save the script and close the Apps Script editor.

5. In your Google Sheets document, select the cell you want to underline.

6. Go to the "Extensions" menu and click on "Apps Script."

7. Click on "underlineCell" to run the script.

The selected cell will be temporarily formatted with an underline.

Understanding the Basics of Cell Formatting in Google Sheets

Before we dive into the world of cell underlining, let's first understand the basics of cell formatting in Google Sheets. Formatting is an essential aspect of creating visually appealing and easy-to-read spreadsheets. Google Sheets offers a wide range of formatting options, including font styles, colors, cell borders, and more.

However, one formatting technique that often gets overlooked is cell underlining. Underlining cells can help draw attention to important data, create clear visual cues, and make your spreadsheets more professional and polished.

What is Cell Underlining and Why is it Useful?

Cell underlining is a formatting technique that allows you to add lines to the bottom of cells in Google Sheets. It is particularly useful when you want to highlight specific data points or create a visual hierarchy within your spreadsheet. By underlining cells, you can make certain information stand out and guide the reader's eyes to important details.

Moreover, cell underlining can be used in various scenarios. For example, you can underline the headers of your columns or rows to make them more distinguishable. You can also underline cells that contain important totals or summaries. The possibilities are endless, and the choice of how to use cell underlining depends on your specific needs and preferences.

How to Underline Cells in Google Sheets

Now that we understand the importance of cell underlining, let's explore how to actually apply this formatting technique in Google Sheets. The process is straightforward and can be done in just a few simple steps.

To underline cells in Google Sheets:

1. Select the cells that you want to underline. You can do this by clicking and dragging your mouse cursor over the desired cells, or by using the keyboard shortcuts (Shift + arrow keys).

2. Once the cells are selected, click on the "Format" menu at the top of the screen.

3. In the dropdown menu, hover over the "Text" option and click on "Underline" from the submenu.

4. Voila! Your selected cells are now underlined.

Additional Features and Functionalities to Explore in Google Sheets

Now that you have mastered the art of cell underlining, it's time to explore other features and functionalities in Google Sheets that can further enhance your spreadsheet skills. Here are a few additional features worth exploring:

1. Data validation: Use data validation to set up rules and restrictions for data entry in your spreadsheet. This helps ensure data accuracy and consistency.

2. Pivot tables: Pivot tables allow you to summarize and analyze large data sets quickly and efficiently. Mastering pivot tables can save you time and provide valuable insights.

3. Charts and graphs: Visualize your data using various chart and graph options in Google Sheets. This makes it easier to identify trends and patterns in your data.


Although underlining cells in Google Sheets may not be as straightforward as in other applications, there are various methods available to achieve the desired effect. By utilizing Conditional Formatting, the CHAR function, the bottom border, or Google Apps Script, you can effectively underline cells in Google Sheets and enhance the visual representation of your data.


Paresh Deshmukh

Co-Founder, BoloForms

23 Jan, 2023

Take a Look at Our Featured Articles

These articles will guide you on how to simplify office work, boost your efficiency, and concentrate on expanding your business.