LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 303
Default Conditional formatting with Rank

No answers yet,,,, so I assume that it is rather difficult or impossible
with conditional formatting.

The other way to do it is with a macro.

This macro will insert a column next to the data column, and fill the new
temporary column (B) with a range
from 1 to 1000.
then it will sort the original data (here in column A)
highlight the top five cells
re-sort the data by the new column B to get the A column back
into the normal unsorted order and
then it will delete the temporary column B.

If you have problems with the use of the macro send me an email direct.

Sub Macro3()

Range("B1").Select
Selection.EntireColumn.Insert
Range("B1").Select
ActiveCell.FormulaR1C1 = "1"
Range("B1").Select
Selection.AutoFill Destination:=Range("B1:B1000"), Type:=xlFillSeries
Range("B1:B1000").Select
Range("A1:B1000").Select
Selection.Sort Key1:=Range("A1"), Order1:=xlDescending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("A1:A5").Select
With Selection.Interior
.ColorIndex = 36
.Pattern = xlSolid
End With
Range("A1:B1000").Select
Selection.Sort Key1:=Range("B1"), Order1:=xlAscending, Header:=xlGuess,
_
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, _
DataOption1:=xlSortNormal
Range("B1").Select
Selection.EntireColumn.Delete
Range("A1").Select
End Sub
--
Greetings from New Zealand

"Sarah" wrote in message
...
Hi there,

I have a column of data that changes regularly. I want to set up
conditional
formatting whereby the top 5 datapoints show up in a different color to
the
others. I think I have to use Rank for this but am not sure how?
Thanks!



 
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
RANK, duplicate ranking but no gaps in rank arron laing Excel Worksheet Functions 4 June 14th 06 07:57 AM
Conditional Format Rank query Rich Excel Discussion (Misc queries) 3 June 12th 06 07:43 PM
Rank where lowest value is highest rank mile3024 Excel Worksheet Functions 2 December 9th 05 10:57 PM
Conditional Formatting that will display conditional data BrainFart Excel Worksheet Functions 1 September 13th 05 05:45 PM
Rank items, select one start date, have remaining dates follow based on rank rob normerica Excel Discussion (Misc queries) 1 August 15th 05 09:36 PM


All times are GMT +1. The time now is 02:21 PM.

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

About Us

"It's about Microsoft Excel"