Actual row of a filtered row
Thank you Tom,
Your code is always interesting to look at.
But I was looking for this
For Each fs In Range("A1:A500").SpecialCells(xlCellTypeVisible)
Msgbox fs.row
Next
Cheers,
Michael Singmin
================================================== =======
"Tom Ogilvy" wrote:
if you want to copy them, then the default is to copy only the visible rows
ActiveSheet.Autofilter.Range.Copy Destination:=Activesheet.Next.Range("A1")
If you want a reference to them
set rng = Activesheet.Autofilter.Range.Columns(1).Cells
set rng = rng.offset(1,0).Resize(rng.rows.count-1)
set rng1 = rng.Specialcells(xlVisible)
if not rng1 is nothing then
msgbox rng1.Entirerow.Address
End if
|