Skip to Content

Conditional Formatting Based on Another Cell in Google Sheets

Conditional formatting is a powerful tool for making data in your spreadsheet easier to understand.

With conditional formatting, you can do things like color-code your spreadsheet based on the values of a cell, or change other formatting of the cell.

One thing many spreadsheet users don’t know about conditional formatting is that you can use it to format a cell based on the values of another cell.

In this tutorial, I will show you how to use conditional formatting based on another cell in Google Sheets.

Table of Contents

Highlight Cell Based On Another Cell

The trick to changing the formatting of a cell based on another cell is to use the Custom formula is option in the conditional format rules.

Let’s take a look at an example.

conditional formatting on another cell example

In this example, I have a month in column A and revenue for that month in column B. I am going to set up a custom formula in conditional formatting that will highlight the month in column A, if the revenue for that month in column B is greater than 2000.

So basically what I am doing is creating a formula that will highlight a cell based on the value of another cell.

Here’s how this is done:

1. The first step is to select the cell range that you want to highlight

highlight based on another cell-1

2. Next in the top menu select Format>Condtional formatting

highlight based on another cell-2

3. Navigate down to the Format rules area and click on the drop-down box to chang the Format cell is rule

highlight based on another cell-3

4. Select Custom formula is

highlight based on another cell-4

5. In the text box, we will be entering our formula. In this example, I want to highlight the cells in column A, if the corresponding cell in column B is greater than 2000. So my formula is “=B2>2000”

highlight based on another cell-5

6. Next we will need to select the color that our cells that meet this rule will change to. Select the Fill color option under Formatting style

highlight based on another cell-6

7. Choose your desired color. I have chosen a green color in this example. Select the green Done button when you are finished

highlight based on another cell-7

8. You will now see that the cells that have met the custom rule you set up will have highlighted with the color you have chosen

highlight based on another cell-8

Conditional Formatting Based on Text in Another Cell

In the previous example, I showed changing the color of one cell based on the value of another cell, but we can also use the same process to change the formatting of a cell based on text in another cell.

In this example, I will be highlighting the students’ name in Column A, if the text in Column C is equal to “Fail’

Highlight based on text example

To do this, the steps are the same as in the previous example. The key is setting up the appropriate custom formula in the conditional formatting rules.

Highlight based on text-1

My formula in this example is:


After I have set up the formula and applied it to the appropriate range, this is how it will look in my spreadsheet:

Highlight based on text-2

Closing Thoughts

When you start to use custom formulas with conditional formatting a lot of possibilities open up for what you can do with the formatting in your spreadsheet.

In this resource, I have covered formatting based on the values of another cell, whether that cell contains a numeric or text value. There are many more ways that you can use it as you get creative with your custom formulas.

More Google Sheets Tutorials:
How to Make Negative Numbers Red