Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Finding and Formatting the 5 highest values in a range?

Hey all,


I am trying to figure out a way to format a set of numbers in an XL sheet
through a macro so that the number with the max value has a cell color
of red, the next max value has a cell color of yellow, the 3rd max value
has a cell color of blue, the 4th max value has a cell color of green, and
the 5th max value has a cell color of grey. If this is confusing replace
the "max value" with "top scoring". There will not be any ties.


For example

02
23 (yellow)
05
27 (red)
08
19 (blue)
01
10 (grey)
00
14 (green)
06


Has anyone done something similar to this and/or have suggestions?

Lance
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,272
Default Finding and Formatting the 5 highest values in a range?

WE answered this yesterday.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"lance" wrote in message
...
Hey all,


I am trying to figure out a way to format a set of numbers in an XL sheet
through a macro so that the number with the max value has a cell color
of red, the next max value has a cell color of yellow, the 3rd max value
has a cell color of blue, the 4th max value has a cell color of green, and
the 5th max value has a cell color of grey. If this is confusing replace
the "max value" with "top scoring". There will not be any ties.


For example

02
23 (yellow)
05
27 (red)
08
19 (blue)
01
10 (grey)
00
14 (green)
06


Has anyone done something similar to this and/or have suggestions?

Lance



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 279
Default Finding and Formatting the 5 highest values in a range?

One approach is to use advanced filter to move data to a new range sorted in
descending order then the cells 1 - 5 of that range are the top 5 in order.
now use match to locate the 5 values on your list and format the resulting
address.

I haven't done it recently but if you macro record you should get 80%

"lance" wrote:

Hey all,


I am trying to figure out a way to format a set of numbers in an XL sheet
through a macro so that the number with the max value has a cell color
of red, the next max value has a cell color of yellow, the 3rd max value
has a cell color of blue, the 4th max value has a cell color of green, and
the 5th max value has a cell color of grey. If this is confusing replace
the "max value" with "top scoring". There will not be any ties.


For example

02
23 (yellow)
05
27 (red)
08
19 (blue)
01
10 (grey)
00
14 (green)
06


Has anyone done something similar to this and/or have suggestions?

Lance

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding highest values Hoytmedic Excel Worksheet Functions 3 July 4th 07 08:58 PM
Finding the highest values bob135 Excel Discussion (Misc queries) 7 April 12th 06 08:22 AM
Finding and Formatting the 5 highest values in a range? Lance Hoffmeyer[_2_] Excel Programming 3 October 18th 05 11:31 PM
Finding (Multiple) Highest Values in Column Shay Hurley Excel Worksheet Functions 1 October 3rd 05 04:19 PM
3 highest values indicated using formatting John Excel Worksheet Functions 7 May 15th 05 02:26 PM


All times are GMT +1. The time now is 04:01 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"