If you want to highlight rows in a table that contain specific text, you use conditional formatting with a formula that returns TRUE when the the text is found. The trick is to concatenate (glue together) the columns you want to search and to lock the column references so that only the rows can change.
For example, assume you have a simple table of data in B4:E11 and you want to highlight all rows that contain the text "dog". Just select all data in the table and create a new conditional formatting rule that uses this formula:
Note: with conditional formatting, it's important that the formula be entered relative to the "active cell" in the selection, which is assumed to be B4 in this case.
How this formula works
The SEARCH function returns the position of the text you are looking for as a number (if it exists). Conditional formatting automatically treats any positive number as TRUE, so the rule is triggered whenever search returns a number. When SEARCH doesn't find the text you're looking for, it returns a #VALUE error, which conditional formatting treats as FALSE.
Using the ampersand (&) we are concatenating all values in each row together and then searching the result with SEARCH. All addresses are entered in "mixed" format, with the columns locked and the rows left relative. Effectively, this means that all 4 cells in each row are tested with exactly the same formula.
Using other cells as inputs
Note that you don't have to hard-code any values that might change into the rule. Instead you can use another cell as an "input" cell so you can easily change it later. For example, in this case, you could name cell E2 "input" and rewrite the formula like so
To highlight entire rows with conditional formatting when a value meets specific criteria, use a formula with a mixed reference that locks the column. In the example shown, all rows where the owner is "bob" are highlighted with the following formula...
The Excel SEARCH function returns the location of one text string inside another. SEARCH returns the position of the first character of find_text inside within_text. Unlike FIND, SEARCH allows wildcards, and is not case-sensitive.
Formulas are the key to getting things done in Excel. In this accelerated training, you'll learn how to use formulas to manipulate text, work with dates and times, lookup values with VLOOKUP and INDEX & MATCH, count and sum with criteria, dynamically rank values, and create dynamic ranges. You'll also learn how to troubleshoot, trace errors, and fix problems. Instant access. See details here.