Change cell colour based on values in other columns.

Closed
dcundill Posts 1 Registration date Wednesday June 17, 2015 Status Member Last seen June 17, 2015 - Jun 17, 2015 at 10:41 AM
Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 - Jun 17, 2015 at 01:45 PM
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
Related:

1 response

Mazzaropi Posts 1985 Registration date Monday August 16, 2010 Status Contributor Last seen May 24, 2023 147
Jun 17, 2015 at 01:45 PM
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.