Forum Discussion

Hotfuzz38's avatar
Hotfuzz38
Copper Contributor
Nov 07, 2024
Solved

Overwriting the conditional format of a cell

Hi. 

In my spreadsheet I have already set up a conditional format to turn a cell red if "Labour" has been entered in to C2, this turns L2 in the sales percentage column to red. 

What I'd like to happen is if I then type 0% in L2 then it turns green. 

My format formulas are- =C2:C76="Labour" turns L2:L76 red. Works as it should. 

This is the one I can't get to work- =AND(C2:C76="Labour",L2:L76=0%) I'd like to turn the cell green. 

Any help would be greatly appreciated. 

Thanks

  • You need two rules for that as shown in the picture below.

    in the on-line version it looks like this:

     

8 Replies

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    Get rid of the one you  have. Just the two rules as indicated in the pictures. Note that you should not reference C2:C76.

    • Hotfuzz38's avatar
      Hotfuzz38
      Copper Contributor

      Ok. I'll try this. If I don't reference C2:C76 then will that not mean that the rule won't apply if "Labour" is written in any cell in column C? I need the same rule to apply to all cells in column C of the table. 

       

      Thanks again

      • Riny_van_Eekelen's avatar
        Riny_van_Eekelen
        Platinum Contributor

        Don't worry. Select L2:L76 and apply the formulas. On L2 they will 'look at' C2, in L3 at C3 and so on.

  • Riny_van_Eekelen's avatar
    Riny_van_Eekelen
    Platinum Contributor

    You need two rules for that as shown in the picture below.

    in the on-line version it looks like this:

     

    • Hotfuzz38's avatar
      Hotfuzz38
      Copper Contributor

      Do I overwrite my =C2:C76="Labour" with =AND(C2:C76="Labour",L2<>0)? 

      Or do I need to keep that and have three rules?

       

      Thanks

Resources