+ Reply to Thread
Results 1 to 6 of 6

Resetting AutoFilter

  1. #1
    Forum Contributor
    Join Date
    06-13-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    245

    Resetting AutoFilter

    Hello, could some please view my code as it runs rather slow. Is there a better way to achieve the same results?

    Please Login or Register  to view this content.
    Any help would be greatly appreciated,

    Kind regards,

    Chris
    Last edited by longbow007; 08-13-2009 at 06:55 AM.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Resetting AutoFilter

    Chris, you could remove the AutoFilter in full and then Re-Apply, ie:

    Please Login or Register  to view this content.
    As for why your code is slow... well remember that toggling visibility of rows is a Volatile action (partly due to Subtotal function etc...), this means that whenever you adjust visibility of rows by altering the filters all of your calculations that include Volatile functions or refer to cells containing Volatile Functions will recalculate - what are Volatile functions ? see link in sig.

    So if you have lots of Volatiles you may want to think about altering the calculation mode of the Application prior to altering the Auto Filter and then resetting calculation to it's original state upon completion.

  3. #3
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,063

    Re: Resetting AutoFilter

    I think you want the ShowAllData method
    Everyone who confuses correlation and causation ends up dead.

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Resetting AutoFilter

    R, presumably the point re: calculation remains however ?

  5. #5
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,063

    Re: Resetting AutoFilter

    Yep - though resetting once should be a lot faster than going one by one.

  6. #6
    Forum Contributor
    Join Date
    06-13-2009
    Location
    Australia
    MS-Off Ver
    Excel 2016
    Posts
    245

    Re: Resetting AutoFilter

    Thanks DonkeyOte and romperstomper for all your great help and advice - really appreciated

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1