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. 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 You can then put any text value in E2, and the conditional formatting rule will respond instantly, highlighting rows that contain that text. See the video link below for a more detailed description.
Case sensitive option
If you need a case-sensitive option, you can use the FIND function instead of SEARCH like so: The FIND function works just like SEARCH, but matches case as well.
Dave Bruns
Hi - I’m Dave Bruns, and I run Exceljet with my wife, Lisa. Our goal is to help you work faster in Excel. We create short videos, and clear examples of formulas, functions, pivot tables, conditional formatting, and charts.