Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi, I altered the code below (written by Chip, in this ng)
To highlight the top ten values... the code stops at 'Next icell' and I don't know why! Does it need error trapping or is it because there could be two equal values ranked 10th which would give 11 highest values? any help would be gratefully recieved... cheers... ste Sub topten() Sheets("All Data").Select Dim rng As Range Dim icell As Variant Dim TheLarge As Long Set rng = Sheets(4).[N3:N18502].SpecialCells(xlCellTypeConstants, xlNumbers) TheLarge = Application.Large(rng, 10) For Each icell In rng If icell.Value = TheLarge Then icell.Interior.ColorIndex = 4 Next icell '<stops here End Sub |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
High Lighting cells | New Users to Excel | |||
High Lighting cells with conditional colour formats | Excel Discussion (Misc queries) | |||
high lighting | Excel Discussion (Misc queries) | |||
VB Code stops working | Excel Programming | |||
VBA code stops executing | Excel Programming |