# Conditional Formatting of one based on the other cell.

Closed
Dimi - Nov 3, 2015 at 08:53 AM
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 - Nov 5, 2015 at 10:38 AM
Hello,

I was wondering if there is a way I can say to excel without coding:

1)IF cell A1 is equal or greater [equal or less] than cell B1, then color cell A1 RED, otherwise no format.

2) Also, is it possible to do double formatting --> If cell A1 is equal or greater than cell B1, then color cell A1 RED, otherwise If cell A1 is equal or less than cell B1, color cell a1 GREEN, otherwise no format.

I would much appreciate your help!

## 2 responses

TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Nov 3, 2015 at 11:21 AM
Hi Dimi,

"equal or greater [equal or less]" uhm ..... which one is it.
Also both statements use equal, this doesn't mean that when A1 and B1 are the same that the cell will be half red and half green (would be cool though). If the first rule is true, then CF doesn't look at the second rule.

Formula's used:
=A1>=B1 ; --> red
=A1<B1 ; --> green

Best regards,
Trowa

Monday, Tuesday and Thursday are usually the days I'll respond. Bear this in mind when awaiting a reply.

In essence this is what I want --> I have three cells A1, B1 and C1. If A1 value (which constatly changes automatically) is equal or greater than B1, I want a red background in cell A1. On the other hand, if A1 value is equal or less than C1, I want a green background in cell A1.

Note: B1 and C1 values will never intersect (B1 is always higher number than C1).
Oh yes and of course, if A1 value is inbetween B1 and C1 I want it to have no background fill.
TrowaD Posts 2921 Registration date Sunday September 12, 2010 Status Moderator Last seen December 27, 2022 552
Nov 5, 2015 at 10:38 AM
Hi Dimi,

That makes more sense, but the formula's won't change that much.

Formula's:
=A1>=B1 ; --> red
=A1<=C1 ; --> green

Best regards,
Trowa