Comparing 3 columns

Closed
Jose D Chiong - Aug 6, 2015 at 07:17 AM
Mazzaropi Posts 1967 Registration date Monday August 16, 2010 Status Contributor Last seen October 3, 2022 - Aug 8, 2015 at 12:19 PM
Hello,

Please help me get the correct formula for this:

RETURN RED IF D1 lower than D2 and lower than D3
RETURN YELLOW IF D1 HIGHER than D2 and HIGHER than D3
RETURN BLUE IF D1 LOWER THAN D2 BUT HIGHER THAN D3
RETURN BLUE IF D1 HIGHER THAN D2 BUT LOWER THAN D3

Help would be much appreciated. TIA

3 replies

TrowaD Posts 2900 Registration date Sunday September 12, 2010 Status Moderator Last seen October 4, 2022 523
Aug 6, 2015 at 11:22 AM
Hi Jose,

So you are looking for the formula's to use with conditional formatting:
1) =AND(D1<D2,D1<D3)
2) =AND(D1>D2,D1>D3)
3) =OR(AND(D1<D2,D1>D3),AND(D1>D2,D1>D3))

You didn't mention any equals, so you might have to add the = symbol on your own.

Best regards,
Trowa
0
Jose D Chiong
Aug 7, 2015 at 06:23 PM
Hi Trowa,

Thanks for the answer, but I don't get it. Should I write all of the above formula in one cell?
0
Mazzaropi Posts 1967 Registration date Monday August 16, 2010 Status Contributor Last seen October 3, 2022 146
Aug 8, 2015 at 12:19 PM
Jose D Chiong, Good afternoon.

TrowaD gave you the formulas that you must apply to the rules part at Conditional Format Menu.

Select cells you want to apply Conditional Formatting.
Conditional Format Menu
Using formula

Rule 1
=AND(D1<D2,D1<D3)
Format as Fill with RED color

Rule 2
=AND(D1>D2,D1>D3)
Format as Fill with YELLOW color

Rule 3
=OR(AND(D1<D2,D1>D3),AND(D1>D2,D1>D3))
Format as Fill with BLUE color

OK

Please, tell us if it worked for you.
I hope it helps.
--
Belo Horizonte, Brasil.
Marcílio Lobão
0