Conditional Formatting: If Cell Contains Text

Ever found yourself poring over spreadsheets, wishing you could quickly identify specific cells based on their content? Conditional formatting in Google Sheets and Excel can do just that, saving you time and effort. One powerful use case is formatting cells that contain specific text. Let's explore how to achieve this.

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

Conditional formatting allows you to apply different formats to cells based on their values. By using the 'Text Contains' rule, you can easily highlight, change the font color, or apply other styles to cells that contain specific text. This can be incredibly useful for spotting trends, errors, or important data within large datasets.

How to conditional formatting if the cell contains partial text in Excel?
How to conditional formatting if the cell contains partial text in Excel?

Getting Started with Conditional Formatting

Before we dive into the 'Text Contains' rule, let's ensure you're familiar with the basics of conditional formatting. In Google Sheets, click on the cell or range you want to format, then click on 'Format' in the menu, and select 'Conditional formatting'. In Excel, select the cell or range, then click on 'Home', 'Conditional Formatting', and 'New Rule'.

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

Both platforms offer a range of formatting options, including fill color, text color, font style, and more. You can also apply multiple rules to a single cell or range, with options to add, edit, or delete rules as needed.

Using the 'Text Contains' Rule in Google Sheets

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

To apply conditional formatting based on text in Google Sheets, follow these steps:

1. Select the cell or range you want to format.
2. Click on 'Format' in the menu, then 'Conditional formatting'.
3. Under the 'Format cells if...' dropdown, select 'Text contains'.
4. Enter the text you want to search for in the 'Value or formula' field.
5. Choose the formatting style you want to apply from the 'Formatting style' dropdown.
6. Click 'Done'.

Using the 'Text Contains' Rule in Excel

Excel Conditional Formatting with Formula If Cell Contains Text
Excel Conditional Formatting with Formula If Cell Contains Text

To apply conditional formatting based on text in Excel, follow these steps:

1. Select the cell or range you want to format.
2. Click on 'Home', then 'Conditional Formatting', and 'New Rule'.
3. Select 'Use a formula to determine which cells to format'.
4. In the 'Format values where this formula is true:' field, enter "=ISNUMBER(SEARCH(text, cell))". Replace 'text' with the text you want to search for.
5. Choose the formatting style you want to apply from the 'Format' dropdown.
6. Click 'OK'.

Advanced Text-Based Conditional Formatting

an excel spreadsheet with multiple columns and numbers
an excel spreadsheet with multiple columns and numbers

While the 'Text Contains' rule is powerful, you can also use other rules to format cells based on text. For example, you can use the 'Text is exactly' rule to format cells that contain an exact phrase, or the 'Text starts with' or 'Text ends with' rules to format cells based on their first few characters or last few characters.

You can also use regular expressions (regex) to create complex text-based rules. For instance, you can use regex to format cells that contain a specific pattern, such as a date format or an email address. However, using regex requires a good understanding of regular expressions and may not be suitable for all users.

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
Google Sheets - Conditional Formatting Based on Another Cell
Google Sheets - Conditional Formatting Based on Another Cell
Conditional Formatting on Text that Contains Multiple Words in Excel
Conditional Formatting on Text that Contains Multiple Words in Excel
Excel Conditional Formatting
Excel Conditional Formatting
Custom Formatting Follow Josh Aharonoff, CPA for more content. This is my favorite Excel trick 😎 No…not to be confused with conditional formatting  Custom Formatting is even cooler…allowing you… | Excel for CFOs
Custom Formatting Follow Josh Aharonoff, CPA for more content. This is my favorite Excel trick 😎 No…not to be confused with conditional formatting Custom Formatting is even cooler…allowing you… | Excel for CFOs
Conditional Formatting in Excel
Conditional Formatting in Excel
Change Cell Colour using Conditional Formatting
Change Cell Colour using Conditional Formatting
Conditional Formatting in Excel (Complete Guide + Examples)
Conditional Formatting in Excel (Complete Guide + Examples)
Apply Conditional Formatting on Multiple Texts in Excel
Apply Conditional Formatting on Multiple Texts in Excel
How to Apply Conditional Formatting in Excel - Highlight Data Visually
How to Apply Conditional Formatting in Excel - Highlight Data Visually
An Intro to Using Conditional Formatting in Excel
An Intro to Using Conditional Formatting in Excel
Excel Conditional Formatting tutorial with examples
Excel Conditional Formatting tutorial with examples
Conditional Formatting on a Row in Excel
Conditional Formatting on a Row in Excel
Format Cells in Excel Based on the Condition or Content
Format Cells in Excel Based on the Condition or Content
the basic excel formats for each type of text, including numbers and letters that are in
the basic excel formats for each type of text, including numbers and letters that are in
5 Handy Excel Tricks for Conditional Formatting Every Analyst Should Know
5 Handy Excel Tricks for Conditional Formatting Every Analyst Should Know
Conditional Format Borders in Excel‼️ #excel
Conditional Format Borders in Excel‼️ #excel
How to Use Conditional Formatting in Excel
How to Use Conditional Formatting in Excel
Set Your Cells Apart: How To Use Conditional Formatting
Set Your Cells Apart: How To Use Conditional Formatting

Combining Text-Based Rules with Other Rules

Conditional formatting isn't limited to text-based rules. You can combine text-based rules with other rules to create complex formatting scenarios. For example, you can format cells that contain specific text and are also greater than a certain value, or format cells that contain specific text and are also in a specific range.

To combine rules, simply create multiple rules and adjust their order and priority as needed. In Google Sheets, you can do this by clicking on the three vertical dots next to a rule and selecting 'Manage rules'. In Excel, you can do this by clicking on 'Conditional Formatting', 'Manage Rules', and adjusting the order of the rules in the list.

Mastering conditional formatting can greatly enhance your spreadsheet skills, making it easier to analyze and present data. By learning how to format cells based on their text content, you can gain valuable insights and improve the readability of your spreadsheets. So go ahead, experiment with different rules and formatting styles, and watch as your spreadsheets transform into powerful tools for data exploration and communication.