Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 7
Default Looping through visible rows only

I run through the rows of a sheet using this code:
----------------------------------------------------------------
i = 1
Do
If Not Range("b" & i).EntireRow.Hidden then
' Do commands
End If
i = i + 1
Loop Until range("a" & i) = ""
----------------------------------------------------------------
Isn't there a FASTER way of going to the next VISIBLE row ? - Because if
only 5 rows are visible (using autofilter) in a sheet of 25,000 rows then
the above code is a waste of time and takes too long.

Please note; I would like to AVOID actually ACTIVATING any cells. I was
thinking using this line;
Range("j" & (i)).Offset(1,0)
in combination with the SpecialCells & xlCellTypeVisible commands, but how ?

Please help!

(c:
Rasmus


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
count rows in a column for looping damorrison Excel Discussion (Misc queries) 2 April 8th 07 10:30 PM
looping through rows and columns mattguerilla Excel Discussion (Misc queries) 1 March 20th 07 05:14 PM
Looping a selection of rows Andre Kruger Excel Discussion (Misc queries) 1 December 15th 05 04:18 PM
Looping through Ranges of Rows MS News Excel Programming 6 December 9th 03 06:13 AM
Looping through Ranges of Rows MS News Excel Programming 0 December 8th 03 11:42 AM


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