+ Reply to Thread
Results 1 to 11 of 11

Replace formulas that are slowing down Excel model significantly

  1. #1
    Registered User
    Join Date
    08-26-2017
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    8

    Replace formulas that are slowing down Excel model significantly

    Could you help me rewrite the formulas in the attached that are slowing down the calculation of my model significantly? The formulas in question are highlighted yellow on the (3) Help tabs in red (columns are AR, AS and AV). The yellow tabs are the lookup tables that the formulas on the Help tabs reference. These lookup tables are thousands of rows long. Also the formulas on the Help tabs are also thousands of rows long and are repeated many times on each tab referencing multiple years of data, which is why the calculation time of the model is now 12 seconds any time something changes.
    Attached Files Attached Files
    Last edited by helpmeplz_; 11-11-2018 at 02:38 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,403

    Re: Replace formulas that are slowing down Excel model significantly

    The first thing to do is to limit your arrays:

    =IF(AQ2<>0,0,IF(ISNA(VLOOKUP($F2,'Lookup Table 1'!$C:$C,1,FALSE)),IFERROR((AI2*(1-VLOOKUP(CONCATENATE('Help 1'!$G2,'Help 1'!$D2),'Lookup Table 1'!$A:$J,10,FALSE))-AP2),0),IF(ISNA(VLOOKUP($F2,'Lookup Table 1'!$C:$J,8,FALSE)),0,AI2*(1-VLOOKUP($F2,'Lookup Table 1'!$C:$J,8,FALSE))-AP2)))

    Change these to something like this:

    $C2:$C5000

    $A2:$J5000

    See if this speeds things up first.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help. It's a universal courtesy.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    NB:
    as a Moderator, I never accept friendship requests.
    Forum Rules (updated August 2023): please read them here.

  3. #3
    Registered User
    Join Date
    08-26-2017
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    8

    Re: Replace formulas that are slowing down Excel model significantly

    Thanks for the response! I changed all the formulas to limit the arrays and saw no improvement in performance.

  4. #4
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (both in England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2503 (Windows 11 Home 24H2 64-bit)
    Posts
    90,403

    Re: Replace formulas that are slowing down Excel model significantly

    Next thing is to try changing the VLOOKUP formulae to INDEX MATCH.

  5. #5
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Replace formulas that are slowing down Excel model significantly

    In the sheet help1 both the below formulas refer to the 2nd row of sheet Lookup Table 1.Will it be the same for all rows in Help sheet.
    More examples in Help sheet and with more data will help to resolve the problem.

    =VLOOKUP($F2,'Lookup Table 1'!$C:$C,1,FALSE)

    =VLOOKUP(CONCATENATE('Help 1'!$G2,'Help 1'!$D2),'Lookup Table 1'!$A:$J,10,FALSE)
    Pl note
    Array formula should be confirmed with Ctrl+Shift+Enter keys together.
    If answere is satisfactory press * to add reputation.

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Replace formulas that are slowing down Excel model significantly

    I have checked the formula speed ± whole column references for the formula on lookup 1, and it made no difference at all. Looking at the other formulae... there's nothing radically different between any of them, so I am surprised that they are making the sheet slow.

    maybe the clue lies here: "which is why the calculation time of the model is now 12 seconds any time something changes." What OTHER formulae are there thatyou haven't told us about. Are there any/many volatile functions: TODAY(), NOW() OFFSET() INDIRECT() functions... or SUMPRODUCT using whole column ranges?

    What else is going on in your real sheet?
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  7. #7
    Registered User
    Join Date
    08-26-2017
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    8

    Re: Replace formulas that are slowing down Excel model significantly

    There are hundreds of thousands of vlookups and sumifs, but no offset, indirect, etc. I've tracked down the performance issue specifically to these columns. By removing these columns, calculations significantly improve. I can work up another file that provides more examples.

  8. #8
    Registered User
    Join Date
    08-26-2017
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    8

    Re: Replace formulas that are slowing down Excel model significantly

    I've uploaded a more complete model with dummy data in my post below as it's too big to share on this forum.

    The formulas that I tracked that are causing a majority of the delay in calculation speed are on the red Help tabs. The specific columns where the formulas are you can find highlighted entirely yellow...they are around AV, AS, AW, etc.
    Last edited by helpmeplz_; 11-11-2018 at 03:42 PM.

  9. #9
    Registered User
    Join Date
    08-26-2017
    Location
    New York
    MS-Off Ver
    Excel 2016
    Posts
    8

    Re: Replace formulas that are slowing down Excel model significantly

    "ufile.io/rcg7v"

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Replace formulas that are slowing down Excel model significantly

    I can't see any obvious problems... apart from the fact that your sheet is too big, with too much going on in it. At 20 Mb, my elderly laptop struggles to keep going.

    Two comments:

    Lookups run much faster on SORTED data. Is that possible?

    Your formulae seem to spend a lot of time thrashing around between worksheets deciding what cells/rows to look up. I don't fully understand what you're up to as the sheet is too big and too sanitised (everything is an error or zero.... so I can't see where any answers that it might throw out would actually come from). But can you do all that decision making on the source sheet and then do a simpler lookup in your summary?

  11. #11
    Forum Expert
    Join Date
    07-20-2011
    Location
    Mysore, India.
    MS-Off Ver
    Excel 2019
    Posts
    8,710

    Re: Replace formulas that are slowing down Excel model significantly

    Functions in the reffered columns have VLOOKUP functions. Same functions repeat and hence repeat calculation are required. With the help of helper column this is avoided. In both the sheets Help1 and Help 2 Column EY is used as helper column and suitably functions are to be changed in columns AV in Sheet Help 1 and AS in sheet 2. Try this.

    Sheet Help 1
    In EY42 then drag down till end.
    Please Login or Register  to view this content.
    In Av42 then drag down
    Please Login or Register  to view this content.
    In Sheet Help 2

    In EY29 then drag down
    Please Login or Register  to view this content.
    In AS29 then drag down
    Please Login or Register  to view this content.
    No change is required in Column AR in Sheet Help 2 and also in sheet Help 3.
    As the file is too big it cannot be uploaded. If required fie wih only Sheets Help 1 and Help 2 will be uploaded.

+ 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. Which Formulas are Slowing Down my Sheet?
    By HWScott in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 06-30-2016, 01:32 PM
  2. Excel Model Help (which formulas should I be using?)
    By ddp34 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-20-2013, 09:35 AM
  3. Does having macros increase the size of an Excel file significantly?
    By VIK1471 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-11-2013, 12:29 PM
  4. Excel vba puzzle -- Thick or double cell borders significantly slow vba code
    By skappy in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 10-01-2012, 06:55 PM
  5. SUMPRODUCT formulas slowing worksheet significantly
    By Jason_2112 in forum Excel General
    Replies: 4
    Last Post: 01-22-2009, 12:25 PM
  6. Excel slowing down during usage
    By cbernad in forum Excel General
    Replies: 3
    Last Post: 08-18-2006, 03:05 PM
  7. Replies: 2
    Last Post: 07-30-2005, 04:05 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