+ Reply to Thread
Results 1 to 7 of 7

Slow Advanced Filter

  1. #1
    Registered User
    Join Date
    06-18-2015
    Location
    Sydney, Australia
    MS-Off Ver
    10
    Posts
    4

    Slow Advanced Filter

    Hi all, this is my first post in tis forum... please be patient with me. I am only a beginner in VBA excel.

    I have a spreadsheet at work with more than 33000 rows and 7 columns. I need to apply a filter to these data with multipe criteris (ranging from 1 to 500). I have used the Advanced Filter to do this task. When I record this Advanced Filter as a macro it works great as long as I trigger the program from the Developer ribbon. However, as soon as I place a Button on the spreadsheet and trigger the filter using this button the program slows right down. For example, a filter with 91 criteria takes 0.23 sec to execute when triggered from the ribbnon but 9.5 sec when triggered with the button. This time it takes for the program to run can increase to more than 180 sec the more criteria are applied. I have searched everywhere but can't find a solution to speed this program up with the Button intact. Without going into the detail, the button has to be part of the program. I would be thrilled if anyone can help me overcoming this problem...!

  2. #2
    Forum Expert
    Join Date
    08-12-2012
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2010
    Posts
    5,636

    Re: Slow Advanced Filter

    whats the code?

    have you tried some of these optimisation ideas?
    http://www.cpearson.com/excel/optimize.htm
    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    06-18-2015
    Location
    Sydney, Australia
    MS-Off Ver
    10
    Posts
    4

    Re: Slow Advanced Filter

    Humdinggaling, yes, I've tried the lot: screenupdating, manual calculation etc etc nothing works... and also remember when the program is intitated from the Developer ribbon it runs perfect... its only when intitated from the button that it slows down...

  4. #4
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Slow Advanced Filter

    I might be terribly wrong, but perhaps its the button that's causing the issue. Maybe it is resulting in some refresh / calculation on its own.

    Maybe you can try incorporating into the code to delete the button, run the code, then reinstate the button?

  5. #5
    Registered User
    Join Date
    06-18-2015
    Location
    Sydney, Australia
    MS-Off Ver
    10
    Posts
    4

    Re: Slow Advanced Filter

    quekbc, thanks for your quick reply... yes, it is definetly the button... and i will try what you suggest! The problem is going to be that I have in this spreadsheet a total of three buttons doing all sorts of things and a list box that allows the user to select the criteria range...not sure how this will pan out...! But I will give this a go! Thanks

  6. #6
    Valued Forum Contributor quekbc's Avatar
    Join Date
    01-18-2010
    Location
    Sydney, Australia
    MS-Off Ver
    2010, 2013, 2016
    Posts
    1,149

    Re: Slow Advanced Filter

    Are the buttons on the same sheet as the data you are trying to filter? If so, maybe you can try separating them unto separate sheets. That might help.

  7. #7
    Registered User
    Join Date
    06-18-2015
    Location
    Sydney, Australia
    MS-Off Ver
    10
    Posts
    4

    Re: Slow Advanced Filter

    quekbc, as you suggested, I placed all the buttons and the listbox onto a seprate sheet that does not contain the data and the filter is back to its normal speed... I can't believe it... such a big relief...! Thank you so much for this tip... it doesn't make sense to me that it works, but it does! Fantastic!!!

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Advanced Filter : One Criteria Cell Breaks the Filter - Returns Only Headers
    By PaulGW in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-28-2014, 10:06 AM
  2. Replies: 5
    Last Post: 12-19-2013, 06:58 AM
  3. advanced filter - button to re apply advanced filter across multiple sheets
    By motmac87 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 03-05-2013, 11:16 PM
  4. Second Advanced Filter does not work based on the data generated from the filter
    By mucc1928 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-29-2011, 02:42 PM
  5. [SOLVED] advanced filter a range:Advanced Filter function
    By Il Principe in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 09-05-2005, 10:05 PM

Tags for this Thread

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