Excel: Conditional Formatting for Cells Containing Text from a List

Ever found yourself poring over an Excel spreadsheet, wishing you could quickly identify cells containing specific text? Conditional formatting in Excel is a game-changer, and one of its most powerful features is the ability to format cells based on whether they contain text from a list. Let's dive into how you can leverage this functionality to streamline your data analysis and presentation.

Excel Conditional Formatting Based on Another Cell Tutorial
Excel Conditional Formatting Based on Another Cell Tutorial

Before we delve into the step-by-step process, let's understand why this feature is so useful. Imagine you have a large dataset and you want to highlight all the cells containing certain keywords, like 'high priority' or 'urgent'. Instead of manually scanning through hundreds of rows, you can use conditional formatting to color-code or otherwise emphasize these cells, saving you time and reducing human error.

Excel Conditional Formatting If a Cell Contains Any Text
Excel Conditional Formatting If a Cell Contains Any Text

Understanding the Conditional Formatting Rule

Excel's conditional formatting rule for text that contains specific criteria is straightforward yet powerful. It allows you to set up a rule that checks if the text in a cell matches any of the items in a list you provide. If there's a match, the cell is formatted according to your specifications.

the basic excel formats for each type of text, including numbers and letters in green
the basic excel formats for each type of text, including numbers and letters in green

To access this rule, you'll first need to enable conditional formatting in your spreadsheet. Here's how:

Enabling Conditional Formatting

How to Do Conditional Formatting Based on Another Cell in Excel (6 Easy Ways) - ExcelDemy
How to Do Conditional Formatting Based on Another Cell in Excel (6 Easy Ways) - ExcelDemy

1. Select the cells you want to apply the rule to.

2. Click on 'Home' in the Excel ribbon, then click on 'Conditional Formatting' in the 'Styles' group.

3. From the dropdown menu, select 'New Rule...'

How to Copy Conditional Formatting to Another Cell in Excel
How to Copy Conditional Formatting to Another Cell in Excel

Setting Up the 'Text that Contains' Rule

1. In the 'New Formatting Rule' dialog box, select 'Use a formula to determine which cells to format'.

2. In the 'Format values where this formula is true:' box, enter the following formula: `=ISNUMBER(SEARCH("your_text", A1))`. Replace 'your_text' with the text you want to search for and 'A1' with the reference of the first cell in your range.

Comprehensive Tutorial for Excel Conditional Formatting
Comprehensive Tutorial for Excel Conditional Formatting

3. Click 'Format...' to choose the formatting style you want to apply to the cells that match the rule. This could be fill color, font color, border style, or any other formatting option.

4. Click 'OK' to close the 'Format Cells' dialog box, then click 'OK' again to close the 'New Formatting Rule' dialog box.

a screenshot of the format dialog box with an arrow pointing to the text area
a screenshot of the format dialog box with an arrow pointing to the text area
Excel conditional formatting formulas based on another cell
Excel conditional formatting formulas based on another cell
Excel Keyboard Shortcuts Every Office User Should Know
Excel Keyboard Shortcuts Every Office User Should Know
Excel Conditional Formatting Tutorial
Excel Conditional Formatting Tutorial
Excel Conditional Formatting
Excel Conditional Formatting
Conditionally format a cell which has part of its text match any value from a range of cells in a specific column
Conditionally format a cell which has part of its text match any value from a range of cells in a specific column
Excel conditional formatting for dates & time: formulas and rules
Excel conditional formatting for dates & time: formulas and rules
How to Format Cells in Excel Like a Pro: Step-by-Step Guide
How to Format Cells in Excel Like a Pro: Step-by-Step Guide
Conditional Formatting Explained in Excel
Conditional Formatting Explained in Excel
3 Crazy Microsoft Excel Formulas That Are Extremely Useful
3 Crazy Microsoft Excel Formulas That Are Extremely Useful
How to Apply Conditional Formatting in Excel - Highlight Data Visually
How to Apply Conditional Formatting in Excel - Highlight Data Visually
advanced conditional formatting in excel
advanced conditional formatting in excel
How to Use Conditional Formatting in Excel
How to Use Conditional Formatting in Excel
Top 100 Excel Hacks | Excel Cheatsheets
Top 100 Excel Hacks | Excel Cheatsheets
Excel Count Cells with Text - Text and Values, Count any Text, Occurrence of specific Text
Excel Count Cells with Text - Text and Values, Count any Text, Occurrence of specific Text
Conditional Format Borders in Excel‼️ #excel
Conditional Format Borders in Excel‼️ #excel
Conditional Formatting in Excel
Conditional Formatting in Excel
Conditional formatting highlight target percentage
Conditional formatting highlight target percentage
Google Sheets - Conditional Formatting Based on Another Cell
Google Sheets - Conditional Formatting Based on Another Cell

Applying the Rule to a List of Text

Now that you've set up the rule for a single text item, let's extend it to apply to a list of texts. For this, you'll use an array formula that checks each item in the list against the cell's text.

Here's how to do it:

Using an Array Formula

1. In the 'New Formatting Rule' dialog box, enter the following array formula in the 'Format values where this formula is true:' box: `{=ISNUMBER(SEARCH({"list1","list2","list3"}, A1))}`. Replace 'list1', 'list2', 'list3' with the texts you want to search for and 'A1' with the reference of the first cell in your range.

2. Follow the same steps 3 and 4 as above to choose the formatting style and apply the rule.

Remember, the list in the formula must be enclosed in curly braces `{}` and each item in the list must be enclosed in double quotes `""`. Also, the formula is case-sensitive, so 'High' and 'high' would be treated as different texts.

Excel's conditional formatting is a powerful tool that can greatly enhance your data analysis and presentation. By mastering the 'text that contains' rule, you can quickly and easily identify and emphasize specific data points in your spreadsheets. So, go ahead and give it a try – your future self will thank you!