Closed Thread
Results 1 to 18 of 18

Data Filters Running Very Slow

  1. #1
    Registered User
    Join Date
    09-29-2009
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2004 for Mac
    Posts
    9

    Data Filters Running Very Slow

    Hi,

    I have an excel sheet with about 3,000 products listed; there are 26 items of data listed against each.

    I've been using Data Filters to manipulate the info, but my worksheet has suddenly started running incredibly slowly - up to 7 minutes to implement a simple filter selection.

    There was no problem until I made a couple of changes last week:

    1. Adding a simple pivot table
    2. Using an Index column plus some linked formulae to extract a list of suppliers from the product list.

    I assumed that it may be the INDEX and related formulae or the pivot table that were causing the Data Filters to run slow, so I deleted them, but to no effect. I've even gone so far as to copy the raw data into a new sheet, but it's still running incredibly slowly when I try to filter. I am convinced that the problem is related to some hidden legacy of the table or functions, as it only started once I'd added these, but I don't know if this is plausible in reality and if so how to get rid of it.

    Any suggestions appreciated.

    -Joe
    Last edited by Jokeyjok; 10-05-2009 at 01:19 PM.

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

    Re: Data Filters Running Very Slow

    Toggling Row Visibility is a Volatile action (for why ? think SUBTOTAL function).
    Given the above any Volatile formulae you have will recalculate as and when Filtering is applied.
    If you have any Arrays / SUMPRODUCTs that are Volatile the impact will be amplified as they are generally slow to calculate.
    Excessive use of Conditional Formats and Named Ranges can also impact peformance.

  3. #3
    Registered User
    Join Date
    09-29-2009
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2004 for Mac
    Posts
    9

    Re: Data Filters Running Very Slow

    Thanks - that's what I thought was happening.

    What's bothering me is that I've already deleted all the formulae completely - but their effect still seems to be persisting even though I've gone as far as to completely delete the columns that contained the formulae.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Data Filters Running Very Slow

    Got any conditional formatting?
    Entia non sunt multiplicanda sine necessitate

  5. #5
    Registered User
    Join Date
    09-29-2009
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2004 for Mac
    Posts
    9

    Re: Data Filters Running Very Slow

    No - I've stripped everything out so that it's a really simple spreadsheet with no formulae or similar remaining.

    To illustrate - I've copied part of the spreadsheet into the attached file - I've had to delete a few columns for confidentiality's sake, but the effect persists nevertheless.

    Thanks for your help.
    Attached Files Attached Files

  6. #6
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Data Filters Running Very Slow

    There are 19 shapes on the sheet that seem to defy selection.

    I ran this, and then it filtered instantly:
    Please Login or Register  to view this content.

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

    Re: Data Filters Running Very Slow

    and now it is my turn to be too slow...

  8. #8
    Registered User
    Join Date
    09-29-2009
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2004 for Mac
    Posts
    9

    Re: Data Filters Running Very Slow

    Thanks - sounds like you're getting somewhere.

    However, I'm a long way from being an expert so I'm sorry but I'm not sure what you mean when you say that you ran that?

    I assume it's some sort of code/programme but I've no idea how to use it?

    Thanks again.

  9. #9
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Data Filters Running Very Slow

    Remove the AutoFilter.

    Adding a Macro to a Code Module
    1. Copy the code from the post
    2. Press Alt+F11 to open the Visual Basic Editor (VBE)
    3. From the menu bar in the VBE window, do Insert > Module
    4. Paste the code in the window that opens
    5. Close the VBE to return to Excel

    Then do Alt+F8, select x in the drop-down, and press Run.

    Then restore the Autofilter and filter away.

  10. #10
    Registered User
    Join Date
    09-29-2009
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2004 for Mac
    Posts
    9

    Re: Data Filters Running Very Slow

    Thanks - almost there - last problem (I hope) is that I'm using a Mac rather than a PC so the shortcuts are different.

    I've got to the bit where I should press Alt F8 but that doesn't do anything on a Mac - would you be able to let me know what the code is short for, please, so that I can go the long way round?

    Thanks

    -Joe

  11. #11
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2003, 2010
    Posts
    40,678

    Re: Data Filters Running Very Slow

    Failed to notice that, sorry.

    No VBA on Macs, and I've never used one, so I don't have a different suggestion.

  12. #12
    Registered User
    Join Date
    09-29-2009
    Location
    Leeds, UK
    MS-Off Ver
    Excel 2004 for Mac
    Posts
    9

    Re: Data Filters Running Very Slow

    Sorry - no need for any more help - I've worked out that it runs just the same on a Mac as on the PC.

    Thanks very much for all your help and apologies for dragging it out with a daft question at the end.

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

    Re: Data Filters Running Very Slow

    Quote Originally Posted by shg View Post
    Failed to notice that, sorry.

    No VBA on Macs, and I've never used one, so I don't have a different suggestion.
    I thought there was VBA support on versions prior to XL 2008 but in 2004 is VB5 based rather than VB6 ... where are the Mac lovers when you need one Romperstomper / Mikerickson etc... ?

    I found this blog by Nate which may be of interest: https://msmvps.com/blogs/nateoliver/...xperience.aspx

  14. #14
    Registered User
    Join Date
    08-01-2013
    Location
    Raleigh, NC USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Re: Data Filters Running Very Slow

    Wow, I had this problem and it was so bad, it was taking 4 minutes to filter or remove a filter, whereas on an older version of the same file, it took seconds. Ran this VBA macro and 'poof'! it now works great. Thanks very much for clearing this up SH!!

  15. #15
    Registered User
    Join Date
    10-11-2013
    Location
    london
    MS-Off Ver
    Excel 2013
    Posts
    6

    Re: Data Filters Running Very Slow

    Will this VBA work on all slow spreadsheets?

  16. #16
    Registered User
    Join Date
    11-08-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Data Filters Running Very Slow

    It worked on mine just now. What a great code!!! It took several minutes to filter a 5500 line sheet. After I ran the code, it went so fast I doubted for a moment if it had even filtered anything (but it did). SHG rocks

  17. #17
    Registered User
    Join Date
    11-08-2012
    Location
    Manchester, England
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Data Filters Running Very Slow

    Ah think I spoke to soon. The macro works, but as soon as I change some data in the sheet I have the same issue again, unless I run this macro every time before I filter. Is there a macro that can trigger the macro above prior to me setting the filter? I can only find ways to trigger macro after filtering.

  18. #18
    Forum Expert Fotis1991's Avatar
    Join Date
    10-11-2011
    Location
    Athens(The homeland of the Democracy!). Greece
    MS-Off Ver
    Excel 1997!&2003 & 2007&2010
    Posts
    13,744

    Re: Data Filters Running Very Slow

    Unfortunately your post does not comply with Rule 2 of our Forum RULES. Do not post a question in the thread of another member -- start your own thread.

    If you feel an existing thread is particularly relevant to your need, provide a link to the other thread in your new thread.

    Old threads are often only monitored by the original participants. New threads not only open you up to all possible participants again, they typically get faster response, too.
    Regards

    Fotis.

    -This is my Greek whisper to Europe.

    --Remember, saying thanks only takes a second or two. Click the little star * below, to give some Rep if you think an answer deserves it.

    Advanced Excel Techniques: http://excelxor.com/

    --KISS(Keep it simple Stupid)

    --Bring them back.

    ---See about Acropolis of Athens.

    --Visit Greece.

Closed 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