+ Reply to Thread
Results 1 to 8 of 8

Excel suddenly extremely slow

  1. #1
    Registered User
    Join Date
    11-22-2017
    Location
    Oshkosh
    MS-Off Ver
    Office 365
    Posts
    12

    Excel suddenly extremely slow

    We have a spreadsheet that pulls in data from multiple sources (Linked tables to JD Edwards software, ODBC to SQL Server) that last week took between 5 and 10 minutes.
    This week it has suddenly started taking about 80 minutes. We've had multiple people try it, with the same results.

    I've stepped through the vba code that it is executing, and I find 10 statements that are doing VLOOKUP's from one tab to another tab. In one of them it is looping through a tab with about 40k rows, looking up values against a tab that has just over 200k rows. In the other 9, it is looping through the tab with 200k rows, looking for a match in the tab that has 40k rows. It takes each vlookup statement between 5 and 10 minutes to execute today; leading to the 80 minutes total.

    What I can't understand is what would have changed between last week and this week to cause this massive change in performance. We are using Office 365, the Excel Application.Version returns 16.0. One user is running Windows 10, the other two are using Windows 7 Enterprise. All systems have 8 gb RAM.

    One thing that confuses me is the range of 200k rows is not sorted by the column that the vlookup is matching (with EXACT setting). I've added code in the script to resort the sheet by that column, and it still takes 80 minutes to run.

    I've eliminated network issues, locking issues (we are accessing an Access 2016 database that contains the linked tables). I've put both files (spreadsheet and database) on my C: drive, and on our network drive. No difference - still 80 minutes.

    None of our other spreadsheets seem to be having this issue (at least nobody has complained about the times).

    This is one of the statements that is choking: SALESEOD = # of rows that have data, it is looking in the 200k tab; Master has 40k rows. The column contains the results of two columns combined (quote# - part#):

    Range("CE6:CE" & bb).Formula = "=IFERROR(VLOOKUP(CD6,Master!$BV$21:$BW$" & SALESEOD & ",2,FALSE),0)"

    Does anyone have any thoughts/suggestions?

    Thanks
    Steve

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Excel suddenly extremely slow

    Initial thought, with datasets that size, is to rebuild using Power Pivot, instead of running thsouands of vlookups.
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Registered User
    Join Date
    11-22-2017
    Location
    Oshkosh
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Excel suddenly extremely slow

    Apparently the issue is that someone changed the start date to 2011, instead of 2016. I was told it was always 2011, but that was not the case.
    Sorry for the wasted time... although if I get a chance I'll look into the Power Pivot product to see if it would make my life better going forward. If I can convince IT to let me install it...

  4. #4
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: Excel suddenly extremely slow

    If you're using Excel 2016 via Office 365 (as your profile indicates) then you already have it...

  5. #5
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: Excel suddenly extremely slow

    Only ProPlus subscription comes with PowerPivot (and few of Enterprise subscription). PowerQuery (Get & Transform) on the other hand, comes with every subscription of Office 365 (albeit with less connectors).
    ?Progress isn't made by early risers. It's made by lazy men trying to find easier ways to do something.?
    ― Robert A. Heinlein

  6. #6
    Registered User
    Join Date
    11-22-2017
    Location
    Oshkosh
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Excel suddenly extremely slow

    Well, that's fortunate, cuz our IT is very stingy about getting us tools...
    Thanks! Now to figure out how to use it... a rainy day project...
    But we have a lot of spreadsheets that use a ton of vlookups, and run for 10-20 minutes. If I could streamline those I'd be a hero!

  7. #7
    Forum Expert CK76's Avatar
    Join Date
    06-16-2015
    Location
    ONT, Canada
    MS-Off Ver
    MS365 Apps for enterprise
    Posts
    5,885

    Re: Excel suddenly extremely slow

    To speedup VLOOKUP there are few ways to go about it.

    1. Query data using PowerQuery and do lookup within it. Load only the result back to sheet or to data model.
    2. Query SQL using VBA, load result to array. Do transformation/lookup operation in memory.
    3. After data is loaded, use VBA to do look up.

    See link for an interesting read on Lookup methods and speed.
    http://analystcave.com/excel-vlookup...l-performance/

  8. #8
    Registered User
    Join Date
    11-22-2017
    Location
    Oshkosh
    MS-Off Ver
    Office 365
    Posts
    12

    Re: Excel suddenly extremely slow

    I've bookmarked that article on lookup methods for more detailed reading... it is interesting... thanks for the tips!

+ 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. Excel 2016 Extremely Slow
    By fornight in forum Excel General
    Replies: 4
    Last Post: 10-20-2017, 10:12 AM
  2. Excel chart extremely slow while printing
    By Proliner in forum Excel General
    Replies: 0
    Last Post: 08-29-2013, 03:44 PM
  3. Excel gets extremely slow adding formulas
    By Hang Glider in forum Excel General
    Replies: 2
    Last Post: 01-17-2012, 05:19 PM
  4. HELP! Extremely slow excel file
    By floripabay in forum Excel General
    Replies: 1
    Last Post: 06-29-2011, 06:07 AM
  5. Excel is extremely slow now
    By Martindelica in forum Excel General
    Replies: 0
    Last Post: 05-01-2007, 08:32 PM
  6. Excel vba script extremely slow
    By persenena in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-05-2005, 08:05 AM
  7. [SOLVED] Excel extremely slow opening and using
    By domestic911 in forum Excel General
    Replies: 2
    Last Post: 01-26-2005, 05:06 PM

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