View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Loop through Filtered Data

Dim rng as Range, rng1 as Range
Dim rng2 as Range
set rng = activesheet.autofilter.range
set rng1 = rng.offset(1,0).resize(rng.rows.count-1,1)
On error resume next
set rng2 = rng1.specialCells(xlVisible)
On error goto 0
if not rng2 is nothing then
for each cell in rng2
msgbox rng2.Address
Next
End if

--
Regards,
Tom Ogilvy

"MJRay" wrote in message
...
Is there a method to loop thorugh each row of a filtered data set? Should

I
just copy the filtered data set to another sheet and run my loop there

since
the data will be in sequential rows? Thanks.

Mike