Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

conditional formating in excel with ordering

Status
Not open for further replies.

nqueen

MIS
Sep 21, 2005
46
0
0
CA
Hi,
I think I have seen a post on this topic before but I was not able to find it and I need to do it very quickly, if someone could help me please.

I have three columns containing numbers. I want to do a conditional formating for each row (3 cells) to show the greater number in red, the middle in yellow and the smaler in green. is there a quick and simple way to do it?

thanks
 
You can have up to three conditions:

Assuming your numbers are in columns A thru C starting in row 1, use these "Formula Is" expressions and set your colors accordingly:
[tt]
=RANK(1,$A1:$C1)=A1
=RANK(2,$A1:$C1)=A1
=RANK(3,$A1:$C1)=A1
[/tt]
You can simply set up cell A1 with the conditional formatting and then copy, paste special formats to the other cells in the range.

 
Thank you for answering so fast Zathras. I tried what you told me but it only works if I input 1,2 or 3 as numbers in my cell if I have let say 4,67,89 respectively, the formatting does not work. Is it because of the first number in the parenthesis ? (RANK(1,$A1:$C1)=A1)
 

Sorry, I don't remember what I was smoking. Here are the correct formulae:
[tt]
=RANK(A1,$A1:$C1)=1
=RANK(A1,$A1:$C1)=2
=RANK(A1,$A1:$C1)=3
[/tt]
Same routine: Set up conditional formatting in cell A1 and then copy / paste-special-formats to all of the cells in your range.

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top