Search code examples
excelexcel-formulaconditional-formatting

Conditional formatting between two values


Hi sorry I just really need some answer for this question. I'm only using my phone.

In the first pic is the simple conditional formatting that I use. Cell value with specific text

But in picture #2 is what I would like to happen. Even in the blank between there would be a color. Not sure if this is possible but I would like to hear from you guys.

Thank you.

Picture #1

enter image description here

Picture #2

enter image description here


Solution

  • The following rules would work for the examples shown:

    =OR(A2="ML",ISODD(COUNTIF($A2:A2,"ML")))
    

    and

    =OR(A2="LWOP",ISODD(COUNTIF($A2:A2,"LWOP")))
    

    enter image description here

    but the problem is if you had a single instance of (say) LWOP like this:

    enter image description here

    there is no way to tell which is a single instance and which denotes an interval.

    I don't believe there is any way of resolving this except by using a separate code for one-off events like LWOPS and changing the formula to:

    =OR(A2="LWOP",A2="LWOPS",ISODD(COUNTIF($A2:A2,"LWOP")))
    

    enter image description here