ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Highlight highest numbers in a range. (https://www.excelbanter.com/excel-programming/385662-highlight-highest-numbers-range.html)

Shawn

Highlight highest numbers in a range.
 
I have a range say A1:A10. Each cell contains a number. I would like a code
that would search this range and autofill the cell of the highest number
green and the second hightest number blue??? Please and thank you.
--
Thanks
Shawn

Dave Peterson

Highlight highest numbers in a range.
 
You may want to look at Format|Conditional formatting:

Select A1:a10
format|conditional formatting
Formula is:
=a1=max($a$1:$a$10)
(Give it a nice green pattern format)

Add a condition:
Formula is:
=a1=large($a$1:$a$10,2)
(Give it a nice blue pattern format)



Shawn wrote:

I have a range say A1:A10. Each cell contains a number. I would like a code
that would search this range and autofill the cell of the highest number
green and the second hightest number blue??? Please and thank you.
--
Thanks
Shawn


--

Dave Peterson


All times are GMT +1. The time now is 11:41 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com