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 Stepping through an autofiltered list

Dim rng as Range, rng1 as Range
Dim cell as Range
set rng = activesheet.Autofilter.Range.columns(1)
set rng = rng.offset(1,0).Resize(rng.rows.count - 1)
On error resume Next
set rng1 = rng.SpecialCells(xlVisible)
On error goto 0
if not rng1 is nothing then
for each cell in rng1
msgbox cell.Value & " - " & cell.row
Next
End If

-
"Stefi" wrote in message
...
Hi All,
How can I make a cycle stepping through a list previously created with
Autofilter? I need the row numbers of the list as well.
Stefi