Google Sheets conditional formatting based on another column text


You can use the custom formula function in Google Sheets to apply conditional formatting to cells based on whether or not another cell contains specific text.

The following example shows how to use the custom formula function in practice.

Suppose we have the following dataset in Google Sheets that contains information about various basketball players:

Google Sheets conditional formatting based on another column text

Suppose we’d like to highlight each of the cells in the Team column based on the text in the corresponding cells of the Rating column.

To do so, we can highlight the cells in the range A2:A11, then click the Format tab, then click Conditional formatting:

Google Sheets conditional formatting based on another column text

In the Conditional format rules panel that appears on the right side of the screen, click the Format cells if dropdown, then choose Custom formula is, then type in the following formula:

=C2="Great"

Google Sheets conditional formatting based on another column text

Once you click Done, each of the cells in the Team column that has a value of “Great” in the Rating column will be highlighted with a green background:

Google Sheets conditional formatting based on another column text

You can also apply conditional formatting to cells that have other text values by clicking Add another rule:

Google Sheets conditional formatting based on another column text

You can then repeat the process to specify background colors for the team names that have “Good” or “Bad” in the Rating column:

Google Sheets conditional formatting based on another column text

Each of the cells in the Team column will receive conditional formatting based on the corresponding value in the Rating column:

Google Sheets conditional formatting based on another column text

From the output we can see:

  • Each Team with a Rating of “Great” has a green background color.
  • Each Team with a Rating of “Good” has a yellow background color.
  • Each Team with a Rating of “Bad” has a red background color.

If any Team had a Rating value other than these three values, it would simply keep a white background color.

Additional Resources

The following tutorials explain how to perform other common tasks in Google Sheets:

Google Sheets: Conditional Formatting If Date is Before Today
Google Sheets: Conditional Formatting with Multiple Conditions

How to apply conditional formatting to a column based on another column?

Re: Conditional Formatting based on Separate Column.
Select M2 (The cell at row 2 in column M).
Home > Styles > Conditional Formatting > Manage Rules..
New Rule..
"Use a formula to determine which cells to format" (you probably have done it).
This step is one of the key that you need to know. ... .
Apply the format you want..

How to highlight a cell if another cell contains specific text Google Sheets?

Highlight Cells Using Conditional Formatting Based on Another Cell Value in Google Sheets.
Select the cells that have the names (A2:A11)..
Go to the Format Tab..
Click on Conditional Formatting..
In the Conditional Formatting rules pane, select Single Color..
From the 'Format Cells if' drop down, select 'Custom Formula is'..

Can we use conditional formatting to highlight one column based on the criteria from other column?

Conditional formatting allows you to apply a format to a cell based on the value in it. in most cases, you will apply conditional formatting to the same cell for which you are analyzing the value. But in some cases, you may want to apply conditional formatting to a cell or column based on values in another column.

How to change colour of cell based on value in another cell?

1.In case the color of cells is required to be changed based on the value of some specific cell then again select the data range..
Click on the Conditional Formatting button in the Home Tab. ... .
Now, select Format only cells that contain. ... .
Press Enter and then click on Format and select your desired color..