Conditional Formatting (left function) question


New Member
Sep 30, 2009

I'm trying to do conditional formating based on the value of another cell. Currently I'm basing it on the first 5 characters in a different cell, as follows.

Forumula is: =left(b10,5)="73214"

Each cell in column b has 10 characters, the first 5 characters are consistent among groups (i.e. all things from group one are 73214*****, from group 2 are 96854*****, etc...)

My issue is that I want to highlight more than 3 groups (excel 03 allows only 3 conditional formatting functions) but with only three colors. For example I want to highlight the groups that start with 73214 and 54897 in yellow.

Is is possible to have a 'left' function that equals more than one thing??

Ex: Something like... =left(b10,5)="73214" OR "54897"

Or does anyone have any ideas of how else to go about this???

I hope I haven't gone into too much detail, please help if anyone knows the answer to this.:confused:

Thank you,



Well-known Member
Aug 12, 2009
To have more than one results try


You should be able to have up to 30 expressions for the OR function in Excel 2003. With 2007 the number has gone up to 255.

Forum statistics

Latest member

Some videos you may like

This Week's Hot Topics

  • VBA (Userform)
    Hi All, I just would like to know why my code isn't working. Here is my VBA code: [CODE=vba]Private Sub OKButton_Click() Dim i As Integer...
  • List box that changes fill color
    Hello, I have gone through so many pages trying to figure this out. I have a 2020 calendar that depending on the day needs to have a certain...
  • Remove duplicates and retain one. Cross-linked cases
    Hi all I ran out of google keywords to use and still couldn't find a reference how to achieve the results of a single count. It would be great if...
  • VBA Copy and Paste With Duplicates
    Hello All, I'm in need of some input. My VBA skills are sub-par at best. I've assembled this code from basic research and it works but is...
  • Macro
    is it possible for a macro to run if the active cell value is different to the value above it
  • IF DATE and TIME
    I currently use this to check if date has passed but i also need to set a time on it too. Is it possible? [CODE=vba]=IF(B:B>TODAY(),"Not...