# If / Then using Color

#### RRico

##### Board Regular
Does someone care to help with this scenario below?

If Cell: A2's numeric Value is ever greater than A1's Value, color A3's Value Green.

### Excel Facts

To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

#### Beate Schmitz

##### Active Member
Conditional Formatting

Hello,

<table border="1" cellspacing="0" cellpadding="0" style="font-family:Arial,Arial; font-size:10pt; background-color:#ffffff; padding-left:2pt; padding-right:2pt; "> <colgroup><col style="font-weight:bold; width:30px; " /><col style="width:80px;" /></colgroup><tr style="background-color:#cacaca; text-align:center; font-weight:bold; font-size:8pt; "><td >*</td><td >A</td></tr><tr style="height:17px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >1</td><td style="text-align:right; ">4</td></tr><tr style="height:17px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >2</td><td style="text-align:right; ">6</td></tr><tr style="height:17px ;" ><td style="font-size:8pt; background-color:#cacaca; text-align:center; " >3</td><td style="background-color:#00ff00; text-align:right; ">4</td></tr></table><br /><table style="font-family:Arial; font-size:10pt; background-color:#fffcf9; border-style: groove ;border-color:#ff0000"><tr><td ><b>Conditional formatting </b></td></tr><tr><td ><table border="1" cellspacing="0" cellpadding="0" style="font-family:Arial; font-size:10pt; padding-left:2pt; padding-right:2pt; "><tr><td >Cell</td><td >Nr.: / Condition</td><td >Format</td></tr><tr><td >A3</td><td >1. / Formula is =AND(COUNT(A1:A2)=2,A2>A1)</td><td style="background-color:#00ff00; ">Abc</td></tr></table></td></tr></table>

#### RRico

##### Board Regular
Beate,

I pasted-in the formula below within the "conditional formatting" option menu:

"1. / Formula is =AND(COUNT(A1:A2)=2,A2>A1)"

This did not work for me. Am I doing something wrong?

#### Beate Schmitz

##### Active Member
Hello,

you only have to put in the formula itself:

=AND(COUNT(A1:A2)=2,A2>A1)

#### RRico

##### Board Regular
Thanks,

I tried it and it worked great, though... when I applied it to my specific scenario ... it did not work.

Here is what I converted it to and does not work:

=AND(COUNT(Q14:Q21)=2,Q21>Q14)

I will state that I also have an equation already in that cell of as below... in case this is what's causing the conflict:

=ABS(Q20-Q19)

Thank you,
Rick

#### Beate Schmitz

##### Active Member
Hello Rick,

try this:

=AND(COUNT(Q14,Q21)=2,Q21>Q14)

#### RRico

##### Board Regular
This worked PERFECT!

Thank you!!

Replies
4
Views
285
Replies
9
Views
556
Replies
4
Views
327
Replies
0
Views
298
Replies
11
Views
843

1,181,451
Messages
5,929,986
Members
436,713
Latest member
arnold_fok

### We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.

### Which adblocker are you using?

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

### Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

### Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back