Table of Contents
Conditional formatting is a feature in Google Sheets that allows users to automatically change the appearance of a cell based on certain conditions. This feature can be used to highlight a cell if another cell contains specific text. By setting up a conditional formatting rule, users can customize the formatting of a cell to change color, font, or style when a particular text is entered in a different cell. This can be a useful tool for organizing and analyzing data in Google Sheets, as it allows for easy identification of important information.
Google Sheets: Conditional Formatting if Another Cell Contains 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.
Example: Conditional Formatting if Another Cell Contains Text in Google Sheets
Suppose we have the following dataset in Google Sheets that contains information about various basketball players:

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:

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"

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:

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

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


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.
The following tutorials explain how to perform other common tasks in Google Sheets:
Cite this article
stats writer (2024). How can I use conditional formatting in Google Sheets to highlight a cell if another cell contains specific text?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-conditional-formatting-in-google-sheets-to-highlight-a-cell-if-another-cell-contains-specific-text/
stats writer. "How can I use conditional formatting in Google Sheets to highlight a cell if another cell contains specific text?." PSYCHOLOGICAL SCALES, 26 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-conditional-formatting-in-google-sheets-to-highlight-a-cell-if-another-cell-contains-specific-text/.
stats writer. "How can I use conditional formatting in Google Sheets to highlight a cell if another cell contains specific text?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-conditional-formatting-in-google-sheets-to-highlight-a-cell-if-another-cell-contains-specific-text/.
stats writer (2024) 'How can I use conditional formatting in Google Sheets to highlight a cell if another cell contains specific text?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-conditional-formatting-in-google-sheets-to-highlight-a-cell-if-another-cell-contains-specific-text/.
[1] stats writer, "How can I use conditional formatting in Google Sheets to highlight a cell if another cell contains specific text?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.
stats writer. How can I use conditional formatting in Google Sheets to highlight a cell if another cell contains specific text?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.
