If you want to highlight cells that begin with certain text, you can use a simple formula that returns TRUE when a cell starts with the text (substring) you specify. For example, if you want to highlight any cells in the range B4:G12 that start with “mi”, you can use: 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. The formula itself uses the SEARCH function to match cells that begin with “mi”. SEARCH returns a number that indicates position when the text is found, and a #VALUE! error if not. When SEARCH returns the number 1, we know that the cell value begins with “mi”. The formula returns TRUE when the position is 1 and FALSE for any other value (including errors).

With a named input cell

If you use a named range to name an input cell (i.e. name G2 “input”), you can simply for the formula and make a much more flexible rule: Then when you change the value in “input”, the conditional formatting will instantly be updated.

Case sensitive option

SEARCH is not case-sensitive, so if you need to check case as well, you can use the FIND function instead: The FIND function works like SEARCH, but is case-sensitive.

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.