LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 117
Default Code stops when high lighting (Chips code)

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
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
High Lighting cells Mike New Users to Excel 2 December 13th 09 02:58 AM
High Lighting cells with conditional colour formats Mike Excel Discussion (Misc queries) 1 December 12th 09 11:15 PM
high lighting Auto Control[_2_] Excel Discussion (Misc queries) 1 August 12th 08 06:07 AM
VB Code stops working Michelle K Excel Programming 17 August 17th 07 05:58 PM
VBA code stops executing Mark Kubicki Excel Programming 0 December 3rd 03 06:47 PM


All times are GMT +1. The time now is 08:30 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"