Loop through filtered cells

Tested in Excel 365 (16.8730.2046) 64-bit

 
 
  1. Sub SpecialLoop()
  2.     Dim cl As Range, rng As Range
  3.     Set rng = Range("A2:A11")
  4.    
  5.     For Each cl In rng.SpecialCells(xlCellTypeVisible)
  6.         Debug.Print cl
  7.     Next cl
  8. End Sub

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.