In this article:

Conditional Formatting If Another Cell Contains Text in Google Sheets

December 5, 2024

In this article we will show you how to apply conditional formatting based on another cell text in Google Sheets. Simply follow the steps below.

Apply Conditional Formatting If Another Cell Contains Text:

For the purposes of this demonstration an example sheet was created. Click here to access the sheet and follow along at home.

In this example, our dataset contains a Movie Title and a Genre. We will be applying conditional formatting to check if a cell in the Genre column contains the text “Comedy” and apply formatting to the movie title next to it if this condition is met.

1. Select the cell to apply the conditional formatting to

Click to highlight the cell. This will be the target cell and will have conditional formatting applied to it.

In our example we are going to select the first cell in the movie title column containing Movie 1

Google Sheets conditional formatting if cell contains text

2. Select Format > Conditional formatting

From the top toolbar select Format. From the menu click Conditional formatting.

Google Sheets conditional formatting if cell contains text: Accessing conditional formatting‍

3. Expand the Format cells if dropdown and select “Custom formula is”

On the right hand side of the display the conditional formatting rules will show.

Google Sheets conditional formatting if cell contains text: Rules‍

In the Format rules section there is a dropdown menu labelled Format cells if..

Expand this drop down menu by clicking on it. At the very bottom of this menu is the option to set Custom formula is, click it to select it.

Google Sheets conditional formatting based on another cell text: Custom formula is

4. Enter the custom formula: =Target_Cell=”Text_Value”

Underneath the format cells if.. drop down menu a new input box will display. Here we will enter the custom formula:

=Target_Cell=”Text_Value”

Formula Breakdown:

Target_Cell: This is the cell we are checking to see if it has the text value present.

“Text_Value”: This will be the text the formula will look for when checking the target cell. The text value has to be enclosed in double quotations (“  ”).

In our example we want to check if the target cell contains the text “Comedy” 

We originally highlighted cell B4, our target cell to check will be the cell next to it C4.

The custom formula for our example using this breakdown is:

=C4=”Comedy”

Google Sheets conditional formatting based on another cell text: Custom formula

4. Set your formatting style

With the format rules set, change the options underneath the Formatting style label. You can change the text style, color and cell color.

For this example we want to change the cell color to blue if the conditions are met.

Google Sheets conditional formatting based on another cell text: Format style

5. Select done to see your results

To set the conditional formatting to your specified conditions select the Done button. The conditional formatting will be applied and results will display if the criteria is met.

As you can see in our example cell C4 contains the text “Comedy” so cell B4 has changed to the color blue.

Google Sheets conditional formatting based on another cell text contains

We can choose to apply the conditional formatting to the other cells by clicking on the blue square at the bottom right hand corner of the cell and dragging over any other cells. 

Google Sheets conditional formatting based on another cell text contains: Expanding to other cells

The custom formula will automatically be adjusted to the new cell details.

In our example we can now see that the format of cells B5 and B7 have also changed to cell color blue based on the text in cells C5 and C7.

Cell B6 has remained unchanged as C6 does not contain the text value “Comedy”.

Google Sheets conditional formatting based on another cell text contains: Results

If you enjoyed this article, you might also like our article on how to make alternating color rows in Google Sheets or our article on how to apply conditional formatting to an entire row in Google Sheets. 

If you want to learn how to email CSV to Google Sheets, we also suggest checking out our detailed guide. 

Use our contract renewal reminder software to easily automate contract reminders from your spreadsheet in just a few clicks.

Get Google Sheets productivity and automation tips delivered straight to your inbox
Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.
We'll email you 1-3 times a week — and never share your information.

Work less, automate more!

Use Lido to connect your spreadsheets to email, Slack, calendars, and more to automate data transfers and eliminate manual copying and pasting. View all use cases ->