This post may contain affiliate links. Please read my disclosure for more info:

Why does Excel’s calculation mode keep changing?

Calculation mode changes

Calculation mode changes

You’re probably aware that Excel has two main calculation modes: automatic and manual.

  • Automatic calculation will re-calculate the workbook when a value changes or based on specific actions (inserting, deleting, hiding rows/columns, or renaming a worksheet).
  • Manual calculation only re-calculates when specifically requested by the user. Click Formulas -> Calculation -> Calculate Now (shortcut key F9) to calculate all open workbooks.  Click  Formulas -> Calculation -> Calculate Sheet (shortcut key Shift + F9) to recalculate only the active worksheet.

Everybody would prefer to use automatic calculation, however formula complexity and large data sets can cause spreadsheet calculation to be slow.  As a result, some users set Excel to manual calculation.

These two calculation modes can cause issues as they do not always behave as we might expect.

 

Understanding the scope of the calculation mode

The calculation mode setting is an application level setting.  It applies to all the workbooks open in Excel.  If Excel is in automatic calculation mode, then all workbooks are in automatic calculation mode.  Equally, if Excel is in manual calculation mode, then all workbooks are in manual calculation mode.

 

What actions change calculation mode

So far, it all seems straightforward.  However, what causes the most confusion is understanding what actions cause the calculation mode to change:

  • Settings changed by the user
  • VBA code
  • First workbook open in a session

 

Settings changed by user

To my knowledge, (excluding VBA code) there are two ways for the user to change the calculation mode, via the Formula ribbon, or via the Options.

Formula Ribbon
Formulas -> Calculation -> Calculation Options

Calculation modes change with Ribbon

Options
File -> Options -> Formulas -> Calculation options

Calculation modes change with options

From either of these methods it is possible to select automatic, automatic except for data tables and manual as options.  The second method also allows changing the option of recalculating when saving.

 

VBA code

When using VBA, it is easy to change the calculation mode.

'Change to automatic calculation
Application.Calculation = xlAutomatic

'Change to manual calculation
Application.Calculation = xlManual

'Change to automatic except for data tables
Application.Calculation = xlSemiautomatic

'When in manual mode, calculate the workbook before saving
Application.CalculateBeforeSave = True

'When in manual mode, do not calculate the workbook before saving
Application.CalculateBeforeSave = False

With VBA it is common to change the calculation mode at the start of a procedure to manual, then change it back at the end to it’s previous setting.  If the Macro errors or aborts before the completion of the code, the calculation mode will not return back to its previous state.  So, VBA code can cause unexpected changes in calculation modes.

 

First workbook in session

The methods above make sense, as they involve application changes from a user action or running a macro.  But the most common reason for the change is not as obvious.

The calculation mode is most often set based on the calculation mode of the first workbook opened in the Excel session.

Each Excel workbook contains the setting of the calculation mode at the point it saves.  The Excel application will adopt that calculation mode if it is the first workbook opened in a session.  Any workbooks opened after this will not change the calculation mode.

 

Which calculation mode are workbooks saved with?

When a workbook saves, it is the calculation mode at the time of saving which is saved back into the workbook.  This can become a problem for anybody who does not understand calculation modes.

Let’s use an example:
John is a new-ish Excel user and does not know that calculation modes exist.  He believes all Excel files are set to automatic calculation, because that is all he has ever experienced.  John’s work colleague sends him a workbook saved in manual calculation mode via e-mail.  This is the first workbook opened in John’s Excel session.  He has no idea the calculation mode has now changed to manual, he has no idea that manual even exists.  John continues to work with Excel; opening, changing, saving and e-mailing workbooks.  There are two issues key issues here:

  1. John has potentially emailed workbooks containing data errors.
  2. The workbooks saved during that session are now set to manual.

To inexperienced users, manual calculation mode can become like a virus which spreads throughout workbooks without them knowing it.  So, check your calculation mode regularly.

 

The bug which may catch you out

There is one ‘bug’ which may catch you out.  If a workbook is saved with multiple sheets selected the calculation mode will display as manual, even though it is automatic.  When a single worksheet is then selected the mode will display to automatic again.  Whether this has further consequences, and which versions of Excel it affects, I am not sure.  But just be aware of it.

 

How to fix your Excel to always be in one mode

The quick answer is that there is no ‘fix’, but there is a few of options:

Get the Calc Buddy Add-in
The Calc Buddy Add-in was specifically designed to help with the problem.  It is completely free and is the best option currently available.

CalcBuddy Add-in

Get a copy of the Calc Buddy Add-in today.

Use VBA in all the workbooks which must be opened with automatic calculation
Adding a workbook open event to your workbook will force the calculation mode to change to automatic each time the workbook is opened.

Private Sub Workbook_Open()
Application.Calculation = xlCalculationAutomatic
End Sub

Always open a specific workbook first
Save a workbook with the correction calculation mode in your XLSTART folder.  That workbook will always open first and set the calculation mode.

2 thoughts on “Why does Excel’s calculation mode keep changing?

  1. Thanks for sharing this, Mark. This seems to fall under a class of related Workbook properties (I’m not aware of an official collection, but I run into a lot of weirdness like this.)

    You can hide grid lines and row/column headings but you can’t keep another person’s ribbon collapsed.

    Speaking of headings, the workbook will remember if it is A1 mode or R1C1 mode. That’s very disconcerting to the unaware.

    Finally, CustomProperties, which you set in VBA, persist until you change or delete them.

    These things are relatively easy to control if you are writing VBA, but it’s too bad average users have to deal with such inconsistencies.

    Cheers,

    Mitch

    • Excel Off The Grid says:

      Hey Mitch – you’re right, it is certainly not clear for most users what impact these settings have. Some apply to the worksheet, some to the workbook and some to the application itself. But how is an average user meant to know.

      I recently saw a workbook which hid the formula bar on open, but did not re-instate it on close. All the users were confused as this is an application level setting, so hide the formula bar permanently. They all had to go into Excels settings and manually re-instate it.

Leave a Reply

Your email address will not be published. Required fields are marked *