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”
Example
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.
Leave a Comment