View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Colo[_17_] Colo[_17_] is offline
external usenet poster
 
Posts: 1
Default How to move to the next filtered row/col in VBA?

Hi ~~,

Yes it can be done with offset and resize propertis! ;)


Code
-------------------

Dim rng As Range, c As Range
With ActiveSheet.AutoFilter.Range
Set rng = .Offset(1).Resize(.Rows.Count - 1).SpecialCells(xlCellTypeVisible)
End With
For Each c In rng.Rows
MsgBox c.Row
c.Select
Next

-------------------


--
Message posted from http://www.ExcelForum.com