Consulting

Results 1 to 3 of 3

Thread: Working with visible rows

  1. #1

    Working with visible rows

    Hi guys !

    I hide rows on my sheet using the autofilter method. Then I wanna loop through ONLY the visible rows (to use the information they contain).

    I know I could loop through all rows and use the .hidden property to find them but I'm looking for a faster way since my sheet contains close to 6000 rows.

    There must be a way...maybe with the specialcells method ??

    Thanks

  2. #2
    Distinguished Lord of VBAX VBAX Grand Master Bob Phillips's Avatar
    Joined
    Apr 2005
    Posts
    25,453
    Location
    Use SpecialCells.

    Something like

    Dim cell As Range
    For Each cell In ActiveSheet.UsedRange.Columns(1).SpecialCells(xlCellTypeVisible)
       'do something
    Next cell
    ____________________________________________
    Nihil simul inventum est et perfectum

    Abusus non tollit usum

    Last night I dreamed of a small consolation enjoyed only by the blind: Nobody knows the trouble I've not seen!
    James Thurber

  3. #3
    Solved !

    Thanks that's exactly what I was looking for

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •