+ Reply to Thread
Results 1 to 8 of 8

Setting Global Recal

  1. #1
    Registered User
    Join Date
    04-26-2010
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    18

    Setting Global Recal

    Hi,

    I've got a rather large spreadsheet with lost of calculations being performed. This spreadsheet works as a tracker for the project I'm on, and it is uploaded at our internal server. The problem is that when people are updating the worksheet, it prompts on recalcuationg the entire sheet everytime, something that needless to say, is very time consuming. What I want to do now is to globaly terminalte the recalcualtion setting so that it is only done manually for this worksheet. I know how to update these settings locally in Excel, but as I said, I need i done globally for this spreadsheet. There has got to be a marco for this, anybody got some input?

    Tnx

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

    Re: Setting Global Recal

    If Auto Calculation grinds your file to a halt then chances are it needs a re-design - that's just my opinion of course.

    You can use the Open event of the Workbook to enforce Manual Calc:

    Please Login or Register  to view this content.
    but as you can see from the above this is an App level setting rather than Workbook level so it will be applied to all files open in that instance of Excel.

    It follows that per the above you may be affecting the integrity of other models being used by the user at that time - without their knowledge.

    I would stand by the point that you need to revisit the model itself - ie improve calculation time (avoiding arrays, volatiles etc etc...)

  3. #3
    Registered User
    Join Date
    04-26-2010
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Setting Global Recal

    Tnx!

    It's is not as much as it grinds it to a halt, rather calculates for a minute or two, enoying enough... The spreadsheet is only meant to be used as a reporting tool, so the users will just go in, update it and then close it down again. No real time spent working with it - that's my job . So if it affects other sheets in the meantime, I dont really care, it woun't be for long anyhow.

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

    Re: Setting Global Recal

    I think the majority of the nerds amongst us would consider a re-calc time running into "minutes" as pretty bad

    Sad to say that a lot us like a good optimisation challenge so if you ever feel the urge to see if the calculation time can be improved upon you know where we are !

  5. #5
    Registered User
    Join Date
    04-26-2010
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Setting Global Recal

    Sure thing! Any fast pointers?

    What I'm doing in short is pulling a SUMPRODUCT() and COUNTIF() from a table of some 350 rows, and using this to populate another table from which I then create a graph. This is simple and fine at first, but when doing the same thing for 5 different tables at ones the thing starts to slow down. I'm going to post a sample worksheet I just have to prepare it first.

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

    Re: Setting Global Recal

    Fast Pointers ?

    Avoid using Arrays & SUMPRODUCTs in large numbers and/or with large ranges.
    If you do use them ensure they are non-Volatile whenever & wherever possible.
    (you can often avoid the need Array / SUMPRODUCT requirement by virtue of helper calcs - more lightweight calcs will perform better than a smaller number of expensive calcs)

    Try to sort data appropriately wherever possible so as to make use of Binary Search based lookups (rather than conducting exact match lookups) - this will greatly reduce the number of cells being processed in large data sets.

    Charles Williams' site is invaluable on the subject of optimisation

    Once you post your sample we can probably offer more specific pointers.

  7. #7
    Registered User
    Join Date
    04-26-2010
    Location
    Stockholm, Sweden
    MS-Off Ver
    Excel 2007
    Posts
    18

    Re: Setting Global Recal

    Hi again,

    I need to reopen this thread cause the code above doesn't solve all my problems. It turns out the darn thing still recalculates the entire worksheet when saved and when filtered. This is a major problem. Is there no why to just go:

    Application.Calculation = NEVER!!!!! (unless I say so, by pressing F9 - darn machine)

    Nope, this is not frustration me...

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

    Re: Setting Global Recal

    Quote Originally Posted by nils.soderstrom
    It turns out the darn thing still recalculates the entire worksheet when saved...
    Recalculation upon Save is another App setting that can be controlled via Code, eg:

    Please Login or Register  to view this content.
    Quote Originally Posted by nils.soderstrom
    ...and when filtered
    Filtering should not invoke Calculation in Manual mode - altering row visibility is a Volatile action but in Manual mode nothing should recalculate per se.

    Do you have any VBA events in place ?

    To reiterate though - coding manual calc etc is (IMO) method of last resort, akin to rearranging the deckchairs on the Titanic - that is to say you would be best served spending time on those underlying issues that are making the use of Manual calc necessary in the first place.

    We're still waiting to see the sample you spoke of ...

+ 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