4.4 C
London
Thursday, March 13, 2025
HomeSoftware TutorialsExcelExcel: How to Apply Conditional Formatting if Cell Contains Text

Excel: How to Apply Conditional Formatting if Cell Contains Text

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

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:

How to Find the Top 10% of Values in an Excel Column
How to Find the Top 10 Values in a List in Excel
How to Find Unique Values from Multiple Columns in Excel

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories