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

Hello,

You can use SpecialCells(xlCellTypeVisible).


Code:
--------------------

Dim rng As Range, c As Range
Set rng = ActiveSheet.AutoFilter.Range.SpecialCells(xlCellTy peVisible)
For Each c In rng.Rows
MsgBox c.Row
c.Select
Next

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



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