Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Forcing Manual Calculation For a Workbook.
Written by Allen Wyatt (last updated April 28, 2021)
This tip applies to Excel 97, 2000, 2002, and 2003
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 my memory isn't always that great.
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.
Note:
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (1988) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Forcing Manual Calculation For a Workbook.
Create Custom Apps with VBA! Discover how to extend the capabilities of Office 2013 (Word, Excel, PowerPoint, Outlook, and Access) with VBA programming, using it for writing macros, automating Office applications, and creating custom applications. Check out Mastering VBA for Office 2013 today!
If you need to consolidate a single column of data into multiple columns of data, you'll love this macro. It provides a ...
Discover MoreYou can use the Zoom feature of Excel to magnify what Excel shows of your workbook, but it affects the entire screen. ...
Discover MoreEver wonder what the macro-oriented equivalent of pressing Ctrl+End is? Here's the code and some caveats on using it.
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
2018-10-31 11:55:53
Lily
This is my first time using a macro, and it's exactly what I needed!! Thank you so very much! (The only other thing I had to do was save my file as a macro-enabled workbook; it had just been a regular Excel workbook up until now. )
2018-06-06 14:20:53
Philip
What happens if you put the first macro into your Personal.xlsb workbook? Will this force all spreadsheets to open in manual calc mode?
Got a version of Excel that uses the menu interface (Excel 97, Excel 2000, Excel 2002, or Excel 2003)? This site is for you! If you use a later version of Excel, visit our ExcelTips site focusing on the ribbon interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2024 Sharon Parq Associates, Inc.
Comments