Ever found yourself poring over Excel sheets, wishing you could quickly identify cells containing specific text? While Excel's built-in features are robust, they might not always seem intuitive. Today, we're going to explore a powerful tool: conditional formatting, with a focus on how to apply it when a cell contains text from another cell.

Conditional formatting is a game-changer in Excel. It allows you to apply specific formatting to cells based on their values. This could be as simple as changing the font color or as complex as displaying an icon. In this guide, we'll delve into using conditional formatting to highlight cells that contain text found in another cell.

Understanding the Basics of Conditional Formatting
Before we dive into the specifics, let's ensure we're on the same page regarding conditional formatting. At its core, conditional formatting is a set of rules that Excel applies to cells based on their values. These rules can be as simple as "if a cell's value is greater than 0, make the text red".

To access conditional formatting, select the cells you want to format, then click on the 'Home' tab in the ribbon. In the 'Styles' group, click on 'Conditional Formatting'. This will open a dropdown menu where you can choose from a variety of formatting options or create new rules.
Using the 'Use a Formula to Determine Which Cells to Format' Option

For our purpose, we'll be using the 'Use a Formula to Determine Which Cells to Format' option. This allows us to use a formula to specify which cells should be formatted. The formula should return TRUE for the cells you want to format and FALSE for those you don't.
For example, if you want to format cells that contain the text "Apple", you might use the formula "=A1="Apple"". However, this only works if you're checking cell A1. What if you want to check a range of cells, or a cell that's not A1?
Using the 'IF' Function in Conditional Formatting

This is where the 'IF' function comes in. The 'IF' function allows you to test a condition and return one value if the condition is true, and another value if it's false. In our case, we want to test if a cell contains a specific text, and if it does, we want to format that cell.
Here's how you can do it. Suppose you want to format cells that contain text found in cell A1. In the 'Use a Formula to Determine Which Cells to Format' dialog box, enter the following formula: "=IF(ISNUMBER(SEARCH(A1, B1)), TRUE, FALSE)". This formula tests if the text in cell A1 is found in cell B1. If it is, the formula returns TRUE, and the cell is formatted. If not, it returns FALSE, and the cell is not formatted.
Applying Conditional Formatting to a Range of Cells

Now that we know how to format a cell based on the text in another cell, let's extend this to a range of cells. Suppose you want to format cells B1:B10 if they contain text found in cell A1.
To do this, simply replace "B1" in the formula with "B1:B10". So, your formula would look like this: "=IF(ISNUMBER(SEARCH(A1, B1:B10)), TRUE, FALSE)". This formula tests each cell in the range B1:B10 to see if it contains the text in cell A1. If it does, the cell is formatted. If not, it's not formatted.




















Formatting Cells Based on Text in Another Cell on Another Sheet
What if the text you want to search for is in a cell on another sheet? Unfortunately, the 'SEARCH' function can't search across sheets. However, you can use the 'INDIRECT' function to get around this limitation.
Suppose you want to format cells B1:B10 if they contain text found in cell Sheet2!A1. You can use the following formula: "=IF(ISNUMBER(SEARCH(Sheet2!A1, B1:B10)), TRUE, FALSE)". The 'INDIRECT' function allows you to reference a cell on another sheet.
And there you have it! You now know how to use conditional formatting to highlight cells that contain text found in another cell, whether it's on the same sheet or another one. This can be a powerful tool for quickly identifying and formatting cells that meet specific criteria.
Remember, the key to effective use of conditional formatting is to keep your formulas simple and easy to understand. This will make it easier to troubleshoot any issues that may arise. Happy formatting!