Consulting

Results 1 to 4 of 4

Thread: Looking for a faster way to autohide rows

  1. #1

    Looking for a faster way to autohide rows

    Hey all!

    I have a worksheet that has several tables that get automatically populated.. at the end of the sub, i hide out all rows that dont't get used by using "for each cell in range". it works fine, but when it scans thru 100+ rows, its get kind of slow (even with screenupdating off).. any idea how i can do this better?

    [vba] For Each Cell In Sheet8.Range("b4:b100")
    Select Case Cell.Value
    Case Is = 0
    Cell.EntireRow.Hidden = True
    End Select
    Next[/vba]

  2. #2
    VBAX Expert CatDaddy's Avatar
    Joined
    Jun 2011
    Posts
    581
    Location
    could you just use a filter on your results when your macro is finished?
    ------------------------------------------------
    Happy Coding my friends

  3. #3
    it's actually 10 tables the go one after another (vertically). i leave 25 rows for each, then hide out everything without a value to "condense" the tables.

  4. #4
    Moderator VBAX Master geekgirlau's Avatar
    Joined
    Aug 2004
    Location
    Melbourne, Australia
    Posts
    1,464
    Location
    As CatDaddy suggests, AutoFilter is the simplest method to do this. Can I ask why you have 10 separate tables running vertically?

    We are what we repeatedly do. Excellence, therefore, is not an act but a habit.
    Aristotle

Posting Permissions

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