PDA

View Full Version : Solved: Working with visible rows



circaa
07-25-2007, 05:49 AM
Hi guys !

I hide rows on my sheet using the autofilter method. Then I wanna loop through ONLY the visible rows (to use the information they contain).

I know I could loop through all rows and use the .hidden property to find them but I'm looking for a faster way since my sheet contains close to 6000 rows.

There must be a way...maybe with the specialcells method ??

Thanks

Bob Phillips
07-25-2007, 05:52 AM
Use SpecialCells.

Something like



Dim cell As Range
For Each cell In ActiveSheet.UsedRange.Columns(1).SpecialCells(xlCellTypeVisible)
'do something
Next cell

circaa
07-25-2007, 06:09 AM
Solved !

Thanks that's exactly what I was looking for