Next visible row in autofilter list

T

Travis

Anyone know how to loop through visible rows in an large autofilter list
without having to loop through the hidden rows? ie: offset(1,0) if
activecell.rowheight = 0 is too cumbersome for a list of say 50,000
rows. I need to loop directly from visible row 10, say, to the next
visible row 3,000.

Would be eternalyl gratefuly for a solution here!

** Posted via: http://www.ozgrid.com
Excel Templates, Training, Add-ins & Software!
http://www.ozgrid.com/Services/excel-software-categories.htm **
 
B

Bob Flanagan

Travis, the following should get you going:

Dim anyR As Range
Dim vCells As Range
Dim cell As Range
Set anyR = Intersect(Columns(1), ActiveSheet.UsedRange)
Set vCells = anyR.SpecialCells(xlCellTypeVisible)
For Each cell In vCells
'do something
Next


Robert Flanagan
Macro Systems
Delaware, U.S. 302-234-9857
http://www.add-ins.com
Productivity add-ins and downloadable books on VB macros for Excel
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top