+ Reply to Thread
Results 1 to 12 of 12

How do I reduce the calculating time in a workbook?

  1. #1
    Registered User
    Join Date
    04-13-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    How do I reduce the calculating time in a workbook?

    I have been building a spread sheet data base which I think is pretty simple.

    It now has quite a few formula's and is taking time to calculate when I add data.

    I have tried to simplify some formula's and get rid of complex one's that can be replaced with simple ones... Is there any advice or suggestions for reducing the calculating time..?

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

    Re: How do I reduce the calculating time in a workbook?

    Don't over use Arrays, don't use Arrays with Large Ranges ... don't use Volatiles (see the Volatile link in my sig) & avoid repetitive calculations.

    I've seen one of your formulae on the other thread which is an array and uses enormous ranges ... with arrays it is imperative you limit ranges as much as possible
    (use Dynamic Named Ranges if necessary - see http://www.contextures.com/xlNames01.html)

  3. #3
    Valued Forum Contributor
    Join Date
    06-16-2006
    Location
    Sydney, Australia
    MS-Off Ver
    2013 64bit
    Posts
    1,394

    Re: How do I reduce the calculating time in a workbook?

    post a sample sheet so we can see it

  4. #4
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: How do I reduce the calculating time in a workbook?

    Take a look here http://www.decisionmodels.com/ it's Charles Williams' (MVP) site, i have just been to an Excel Users Conference where he gave a tutorial on speeding up Excel's calculations, he has some great stuff there.
    Not all forums are the same - seek and you shall find

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

    Re: How do I reduce the calculating time in a workbook?

    I suspect we were at the same conference (@ Victoria?) .. I went specifically on the Thurs to hear his talk in the afternoon... (and have finally put his site available via my Sig (to Volatile initially).. I reference the site so often it's not true)

  6. #6
    Forum Expert Simon Lloyd's Avatar
    Join Date
    03-02-2004
    Location
    locked in the cage
    MS-Off Ver
    All the ones my homepage shows
    Posts
    3,161

    Re: How do I reduce the calculating time in a workbook?

    Quote Originally Posted by DonkeyOte View Post
    I suspect we were at the same conference (@ Victoria?) .. I went specifically on the Thurs to hear his talk in the afternoon... (and have finally put his site available via my Sig (to Volatile initially).. I reference the site so often it's not true)
    Yes, i went both days! pictures can be seen at here http://picasaweb.google.co.uk/xld.bo...InI_OSvi8iHgQE#

  7. #7
    Forum Contributor
    Join Date
    10-30-2007
    Location
    Norway
    MS-Off Ver
    MS Office 2007
    Posts
    345

    Re: How do I reduce the calculating time in a workbook?

    The placement of your formulas relative to the cells you are referencing can influence on the calculation time.
    Excel calculates the sheets in the order they are sorted, and calculates from left to right and from top to bottom. This means that if the current cell Excel calculates is referenced in a formula that is already calculated it has to go back and recalculate the already calculated cell.

    I think Excel also has a smart way to manage these cases, because most of the time i don't see any performance difference when I reorder my formulas. But with array formulas i have seen this have a huge impact om the performance.

    I once got a huge workbook, and I mean realy huge. It contained 10-15 sheets, each with a few hundred to tens of tousands of rows, and lots of colums.
    And a lot of SUMIF's, VLOOKUP's and array formulas. The calculation time for this beast was about 6 hours ! I was asked if I could do something about it. I managed to identify the order of the references the formulas had and in the end I rearranged the order of the a couple of sheets, and found 2 cells from one of the sheets that I moved to a new sheet in front of all the others. The calculation time was reduces to 9 minutes only by this reordering, and not changing a single formula.

    I now try to arrange all my sheet so that references always are made to cells that are to the left or above the current cell, or is in a sheet before the current sheet. Even if I don't get any performanse boost from this, I think it makes the logic easier to read too.

  8. #8
    Forum Contributor
    Join Date
    10-30-2007
    Location
    Norway
    MS-Off Ver
    MS Office 2007
    Posts
    345

    Re: How do I reduce the calculating time in a workbook?

    A couple of other tips is to turn on manual calculation when you enter data and use F9 to do the calculation.

    If you have your data arranged like a database in an list in Excel you should also learn to master the Pivot Table functionality instead of doing the report with formulas. In most of the cases you will be able to get your desired result with a Pivot Table. The recalculation of a Pivot Table is amazingly much faster than conventional use of VLOOKUP, SUMIF's and the database functions in Excel.

  9. #9
    Registered User
    Join Date
    04-13-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Re: How do I reduce the calculating time in a workbook?

    Thanks everyone!

    I have used the following suggestions so far:

    *Removed auto calculation (Using F9 to manually calculate)
    *Re-sorted the order of the sheets (Never thought of that before)

    With the following results
    *Manual calculation is shortening entry time significantly
    *Re-Sorting - I haven't noticed any real differnce... yet

    I'm interested in the suggestion to remove array formula and use standand "sumif" but this hasn't worked yet.

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

    Re: How do I reduce the calculating time in a workbook?

    Manual calculation will obviously improve performance if the file is slow to calculate ... particularly if you have Volatile Arrays... however it does not solve the underlying problem(s).

    Bjornar's suggestions are certainly good ones IMO... as referenced previously (via my sig) you should certainly work through Charles Williams' site - it is generally regarded as the place to go for any/all Calculation related queries... the author is on the steering committee for MS re: new versions etc... ie he knows his stuff.

    I would pretty much stake my house on the fact that your arrays are the cause of the problem... without seeing your file it's very hard for us to show you how to correct the issues... rarely are Arrays needed in Volume - using Concatenation and SUMIF/COUNTIF will have an immense impact on the performance of your file... there are a lot of examples of this on the forum... Array should be used very sparingly.

    In short post a sample file.

  11. #11
    Registered User
    Join Date
    04-13-2009
    Location
    Sydney, Australia
    MS-Off Ver
    Excel 2003
    Posts
    15

    Post Re: How do I reduce the calculating time in a workbook?

    Quote Originally Posted by Mallycat View Post
    post a sample sheet so we can see it
    I have uploaded a sample with dummy data in it.

    Any advise would be appreciated

    *Any likeness to any person or character living or otherwise is purely coincidental*
    Attached Files Attached Files

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

    Re: How do I reduce the calculating time in a workbook?

    OK, I've had a quick look through it and yes your high volume of arrays (and immense ranges) are undoubtedly the cause of the problem...

    I have for your benefit reviewed and replaced the expensive formulae with less expensive formulae... the file should now run on Auto Calc instantaneously.

    Notes:

    -- The headers in the columns containing formulae that need to be corrected have been highlighted red so you can see where changes made...

    -- The old formulae were placed either above or below the data in the same column so you can compare

    -- The single condition SUM(IF CSE's have been replaced with simple SUMIF (as discussed on your other thread)

    -- The multi condition SUMPRODUCT(s) have been replaced with COUNTIFs utilising Wildcard approach and a concatenation column which I added to your Tracking sheet in Column AB


    EDIT: I forgot to remove the Module1 from the VBE which is a simply Range.Calculate method (so you can calc only a specific range of cells at a time... this was for testing and can be removed... unless removed you may get prompted to Enable Macros)


    Let us know your results given revised approach.
    Attached Files Attached Files
    Last edited by DonkeyOte; 04-25-2009 at 04:15 AM.

+ 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