Change cell colour based on values in other columns. [Closed]

Report
Posts
1
Registration date
Wednesday June 17, 2015
Status
Member
Last seen
June 17, 2015
-
Posts
1927
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
June 17, 2021
-
Hello,
I would like to change cells in column C base on numbers in Column A and B. So for example,
A1=3, B1= 1, C1= Red
A2=2, B2= 2, C2= yellow
A3=1, B3= 2, C3= green.

I will need to include an "and" argument in the formula as in some cases, the decision is more complex if Column A and B produce different results. For example:
A1=3, B1= 1, C1= Red
A2=2, B2= 2, C2= yellow
A2=2, B2= 3, C2= red
A3=1, B3= 2, C3= green
A3=1, B3= 3, C3= yellow.


Thank you

1 reply

Posts
1927
Registration date
Monday August 16, 2010
Status
Contributor
Last seen
June 17, 2021
143
dcundill, Good morning.

Try to use:

1) Apply Conditional Formatting to C1 cell using formula:
Rule 1:=AND(A1=3,B1=1)
Choose RED colour as fill

2) Apply Conditional Formatting to C2 cell using formula:
Rule 1: =AND(A2=2,B2=2)
Choose YELLOW colour as fill
Rule 2:=AND(A2=2,B2=3)
Choose RED colour as fill

3) Apply Conditional Formatting to C3 cell using formula:
Rule 1: =AND(A3=1,B3=2)
Choose GREEN colour as fill
Rule 2:=AND(A3=1,B3=3)
Choose YELLOW colour as fill

Please, tell us if it worked for you.

Is it what you want?
I hope it helps.

Subscribe To Our Newsletter!

The Best of CCM in Your Inbox

Subscribe To Our Newsletter!