Conditional formatting based on numbers in columns

N

Nic Daniels

Hi,

I would like to change the background color of a two cells (row by row)
based on values in two other cells in the same row.


If C1>0 AND if C1>D1, the background color of cell A1 turns green and B1
turns red.

but If C1>0 AND C1=D1, the background colors of both cells, A1 and B1 turn
green.


Ex:
A B C D
1 Green Red 1 0
2 Green Green 12 12
3 No change in background color

Thank you!
 
S

Stefi

Condition formula for Column A:
=AND(C1>0,C1>=D1)
Condition formula1 for Column B:
=AND(C1>0,C1>D1) red
=AND(C1>0,C1=D1) green

Regards,
Stefi

„Nic Daniels†ezt írta:
 
M

Mike H

Hi,

For you first condition apply this to A1 and select Red

=AND(C1>0,C1>D1)

Click ADD and apply this second condition to A1 and choose Green

=AND(C1>0,C1=D1)

Repeat the above for B1 choosing the appropriate colours.

Mike
 
N

Nic Daniels

Thank you!




--
Kind regards, Nic


Stefi said:
Condition formula for Column A:
=AND(C1>0,C1>=D1)
Condition formula1 for Column B:
=AND(C1>0,C1>D1) red
=AND(C1>0,C1=D1) green

Regards,
Stefi

„Nic Daniels†ezt írta:
 
N

Nic Daniels

Thank you!






--
Kind regards, Nic


Mike H said:
Hi,

For you first condition apply this to A1 and select Red

=AND(C1>0,C1>D1)

Click ADD and apply this second condition to A1 and choose Green

=AND(C1>0,C1=D1)

Repeat the above for B1 choosing the appropriate colours.

Mike
 
S

Stefi

You are welcome! Thanks for the feedback!
Stefi

„Nic Daniels†ezt írta:
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top