How can I use conditional formatting in Excel to highlight cells that contain specific text? 2

How can I use conditional formatting in Excel to highlight cells that contain specific text?

Conditional formatting in Excel is a useful tool that allows users to automatically highlight cells that meet a certain criteria. By setting up a rule based on specific text, users can easily identify and draw attention to important data in their spreadsheets. This can be particularly helpful in large datasets where manually searching for specific text can be time-consuming. By utilizing conditional formatting, users can quickly and efficiently highlight cells that contain specific text, making it easier to analyze and interpret data. This feature is especially useful for organizing and categorizing data, and can greatly improve the efficiency and accuracy of data analysis in Excel.

Excel: Apply Conditional Formatting if Cell Contains Text


Often you may want to apply conditional formatting to cells that contain specific text in Excel.

The following example shows exactly how to do so.

Example: Conditional Formatting if Cell Contains Text

Suppose we have the following dataset that shows the names of various basketball teams:

Suppose we would like to highlight each team name equal to “Mavs” in column A.

To do so, highlight the values in the range A2:A14, then click the Conditional Formatting icon on the Home tab, then click New Rule:

In the new window that appears, click Use a formula to determine which cells to format, then type in the following formula into the box:

=SEARCH("Mavs", A2)

Then click the Format button and choose a color to use to fill in the cells that contain “Mavs” in the name. Then click OK:

Excel conditional formatting for cells that contain text

Each team that contains “Mavs” in the name will automatically be highlighted:

Note that you can also highlight cells that contain partial text by using the asterisk (*) wildcard with the SEARCH function.

For example, we could use the following formula to highlight all team names that contain the partial text “avs” in the name:

=SEARCH("*avs*", A2)

Once we click OK, each team that contains “avs” in the name will be highlighted:

Additional Resources

The following tutorials explain how to perform other common operations in Excel:

Cite this article

stats writer (2024). How can I use conditional formatting in Excel to highlight cells that contain specific text?. PSYCHOLOGICAL SCALES. Retrieved from https://scales.arabpsychology.com/stats/how-can-i-use-conditional-formatting-in-excel-to-highlight-cells-that-contain-specific-text/

stats writer. "How can I use conditional formatting in Excel to highlight cells that contain specific text?." PSYCHOLOGICAL SCALES, 30 Jun. 2024, https://scales.arabpsychology.com/stats/how-can-i-use-conditional-formatting-in-excel-to-highlight-cells-that-contain-specific-text/.

stats writer. "How can I use conditional formatting in Excel to highlight cells that contain specific text?." PSYCHOLOGICAL SCALES, 2024. https://scales.arabpsychology.com/stats/how-can-i-use-conditional-formatting-in-excel-to-highlight-cells-that-contain-specific-text/.

stats writer (2024) 'How can I use conditional formatting in Excel to highlight cells that contain specific text?', PSYCHOLOGICAL SCALES. Available at: https://scales.arabpsychology.com/stats/how-can-i-use-conditional-formatting-in-excel-to-highlight-cells-that-contain-specific-text/.

[1] stats writer, "How can I use conditional formatting in Excel to highlight cells that contain specific text?," PSYCHOLOGICAL SCALES, vol. X, no. Y, ص Z-Z, June, 2024.

stats writer. How can I use conditional formatting in Excel to highlight cells that contain specific text?. PSYCHOLOGICAL SCALES. 2024;vol(issue):pages.

Download Post (.PDF)
Slide Up
x
PDF
Scroll to Top