Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, and 2016. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Forcing Manual Calculation For a Workbook.

Forcing Manual Calculation For a Workbook

by Allen Wyatt
(last updated December 12, 2015)

2

Excel workbooks can become quite complex. In fact, it is possible to create workbooks that can take hours to calculate. The only problem with this, of course, is that when you open a workbook, it automatically recalculates if you have Excel configured to do that. This means that just opening a workbook can, in some instances, take hours.

One solution, of course, is to turn off automatic recalculation before you open the workbook. If you are like me, this solution isn't that great because neither is my memory.

A better solution is to turn off automatic recalculation for certain workbooks. Since Excel doesn't allow you to specify manual or automatic recalculation on a workbook-by-workbook basis, you will need to add this feature through the use of a macro that automatically runs when the workbook is opened. This macro can turn off automatic recalculation, as shown here:

Private Sub Workbook_Open()
    Application.Calculation = xlManual
    Application.CalculateBeforeSave = False
End Sub

This macro must be placed in the ThisWorkbook project window. This means that you should open the workbook, press Alt+F11 to display the VBA Editor, and then double-click on the ThisWorkbook object in the Object Browser (upper-left corner of the VBA Editor window).

If you want, you can also place another macro right after the previous one. This macro is run automatically when the workbook is closed and, in this case, turns automatic recalculation back on:

Private Sub Workbook_BeforeClose(Cancel As Boolean)
    Application.Calculation = xlAutomatic
    Application.CalculateBeforeSave = True
End Sub

There is an important caveat to remember in relation to using this macro. You can only set the calculation mode for the application as a whole. Thus, with automatic recalculation turned off, no other worksheets will be automatically recalculated, either.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (11577) applies to Microsoft Excel 2007, 2010, 2013, and 2016. You can find a version of this tip for the older menu interface of Excel here: Forcing Manual Calculation For a Workbook.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He  is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Hyperlink Formatting

Word, as you type, normally formats hyperlinks automatically. If you don't like the way that hyperlinks look in a ...

Discover More

Converting From Numbers to Text

If you have a range of numeric values in your worksheet, you may want to change them from numbers to text values. Here's ...

Discover More

Choosing How to Use Multiple Monitors

Do you have multiple monitors (or a projector) hooked up to your system? Here's how to utilize that second display device ...

Discover More

Excel Smarts for Beginners! Featuring the friendly and trusted For Dummies style, this popular guide shows beginners how to get up and running with Excel while also helping more experienced users get comfortable with the newest features. Check out Excel 2013 For Dummies today!

More ExcelTips (ribbon)

Automating Copying Macros

You can manually copy macros from one workbook to another, but what if you want to automate the copying process? Here's ...

Discover More

Positioning a Column on the Screen

If you have static columns and dynamic columns on the screen, you may want the dynamic columns to always show a ...

Discover More

Trouble Recording Paste Special Formula

Sometimes, when you upgrade to a new version of Excel, you could run into a problem recording macros that you had no ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is seven minus 2?

2017-11-02 06:53:09

Uwe

Hi Allen,
1st of all: many thanks to you for hundrets of times you got me out of trouble with your tips!
I'm struggeling with an Excel workbook which I only need to read from but which is very large and contains many complex formulas.
As you already mentioned, this one takes depending on your machine, roundabout half an hour to calculate.
I don't need to read from any calculated cell, so I don't need to have the workbook recalculated.
But: I'm not the owner of that workbook and cannot insert a makro which prevents it for automatic recalculation since other people who maintain it will get into trouble due to outdated cell contents.
Is there a way for me to read-only open the "foreign" workbook and prevent it from recalculation without compromising the owner of it?
By the way: we're talking about Excel 2010, OK?
It would be highly appreciated if you could help me with this.
Many thanks in advance and have a great time!
Uwe


2016-03-22 11:50:13

Michael Johnson

Hi,
The OPEN macro presented here doesn't solve the problem described. Upon opening my Excel 2010 workbook, the 20 minutes of calculation begins just like normal. If you have additional information or tips for making this coding work, please let me know.
Thank you
Excel user for 20 years


This Site

Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.