Google-sheets – Google Sheets conditional formatting with AND for value range

conditional formattinggoogle sheets

I'm trying to set a colour range of conditional formatting based on another cells value. So if A1 is larger than A2 it will be Blue, if A1 is between 0 and A2 it will be Yellow and if A1 is less than 0 it will be red.

I'm struggling with the second function – if A1 is between 0 and A2 it will be Yellow. Please can someone advise how to do this?

Best Answer

Two solutions.


A/ Either you do a condition for each case

=A1>A2             BLUE

=AND(A1>0,A1<A2)   YELLOW

=A1<0              RED

B/ You set the cell in yellow and put only 2 condition format rules.

=A1>A2             BLUE

=A1<0              RED