Go Back

Highlight cells that begin with

In excel, it is possible to highlight cells that begin with a certain text using conditional formatting and a formula that returns TRUE when cell starts with the text as specified. To learn how to highlight cells that begin with a particular text in excel, read this illustrative post to the end.

Figure 1: How to highlight cells that begin with a given text string

General syntax of the formula

=SEARCH (“substring”, A1)=1

Understanding the formula

When a formula is used to apply a given conditional format, that formula is first evaluated based on the active cell in your selection. This is the case when you are creating the rule. In our case above, the rule we create shall be evaluated for each of the cells in the range A2:B7. A2 will then change to reflect the address of the cell being evaluated each time because it is entered as a relative address.

  • In this example, we want to highlight cells that begin with “Je”. To do this, we simply need to highlight the cells and apply conditional formatting.
  • In the formula bar, we enter the formula to be used as a rule, which is =SEARCH(“Je”,A2)=1
  • We then press Enter to highlight those cells that begin with “Je”


Figure 2: Example of how to highlight cells that begin with “Je”

Note that you can also use excel built-in presets to highlight those cells that begin with a particular text string. To do this, you simply need to select the range where your data is, then click on “Conditional formatting”. After that, you will have to specify the text string that will define your rule.

This formula utilizes the SEARCH function in order to match cells that begin with your specific text string. If the text string is found, the formula will return a number. If not found, it will return a #VALUE! Error.

Instant Connection to an Expert through our Excelchat Service

Most of the time, the problem you will need to solve will be more complex than a simple application of a formula or function. If you want to save hours of research and frustration, try our live Excelchat service! Our Excel Experts are available 24/7 to answer any Excel question you may have. We guarantee a connection within 30 seconds and a customized solution within 20 minutes.

Did this post not answer your question? Get a solution from connecting with the expert.

Another blog reader asked this question today on Excelchat:
Here are some problems that our users have asked and received explanations on

Match is excluding items that begin with the letter "B"
Solved by B. W. in 21 mins
I cannot highlight cells with keypad only with shift
Solved by I. J. in 16 mins
I need to combine sum of sales for SKUs that begin with the same 5 numbers
Solved by K. L. in 27 mins

Leave a Comment