Loading
Excel.Tips.Net ExcelTips (Menu Interface)

Calculating Only the Active Workbook

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: Calculating Only the Active Workbook.

Linda asked if there is a way to calculate only the active workbook. When a recalc is performed by Excel, it recalculates all her open workbooks, and if they are very large workbooks it can sometimes take over fifteen minutes to recalc. If she is able to limit what is recalculated, then the process will obviously run faster.

Unfortunately, there is no direct method to just calculate a particular workbook. You can, however, calculate just the active worksheet, if desired. First, set the recalculation mode to manual by following these steps:

  1. Choose Options from the Tools menu. Excel displays the Options dialog box.
  2. Make sure the Calculation tab is displayed. (See Figure 1.)
  3. Figure 1. The Calculation tab of the Options dialog box.

  4. Select the Manual check box.
  5. Click OK.

Now the only time your workbook (actually, all your open workbooks) will be recalculated is when you press F9. If you want to recalculate only the current worksheet, then press Shift+F9.

Excel also provides macro functions that allow you to do any of these three things: calculate all open workbooks, calculate a specific worksheet in a workbook, or calculate a specified range of cells on a worksheet. With this knowledge you could create a macro that would loop through all the worksheets in a workbook and recalculate each of them.

The following macro sets the calculation mode to manual (so the other workbooks will not calculate) and then loops through and calculates each sheet of the active workbook.

Sub CalcBook()
    Dim wks As Worksheet
    Application.Calculation = xlManual
    For Each wks In ActiveWorkbook.Worksheets
        wks.Calculate
    Next
    Set wks = Nothing
End Sub

If you believe that you may want to calculate different parts of your workbook at different times, you can expand the macro so that it will perform any type of calculation you may want:

Sub CalcWhat()
    Dim iAnsure As Integer

    Application.Calculation = xlManual
    iAnsure = InputBox("1 = Calculate A Used Range" _
      & vbCrLf & _
      "2 = Calculate This Worksheet" _
      & vbCrLf & _
      "3 = Calculate This Workbook" _
      & vbCrLf & _
      "4 = Calculate All Workbooks in Memory" _
      & vbCrLf & vbCrLf & _
      "Input Your Selection Number From Above" _
      & vbCrLf & "Then Click OK", _
      "Calculate What?", "Input Number Please", _
      5000, 5000)

    Select Case iAnsure
        Case 1 'Range Only
            Selection.Calculate
        Case 2 'Worksheet Only
            ActiveSheet.Calculate
        Case 3 'Workbook Only
            For Each wks In ActiveWorkbook.Worksheets
                wks.Calculate
            Next
        Case 4 'All Open Workbooks
            Application.CalculateFull
        End
    End Select
End Sub

This macro presents an input box that prompts the user as to which type of recalculation is desired. When the user enters a number from 1 to 4, the desired type of recalculation is performed.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (2877) 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: Calculating Only the Active Workbook.

Related Tips:

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!

 

Leave your own comment:

*Name:
Email:
  Notify me about new comments ONLY FOR THIS TIP
Notify me about new comments ANYWHERE ON THIS SITE
Hide my email address
*Text:
*What is 5+3 (To prevent automated submissions and spam.)
 
 
           Commenting Terms

Comments for this tip:

LUCY WESTENRA    24 Apr 2015, 09:50
"Unfortunately, there is no direct method to just calculate a particular workbook."


Solution. Dump Excel and use "Ragtime" It's streets ahead of Excel in all sorts of ways and calculating individual spreadsheet "frames" is a piece of cake.
Rajendra    19 Jan 2015, 01:53
Wishing you a Happy Brand New Year 2015

The sight is very useful, many thanks goes to Mr.Allen Wyatt

All the best for your future assignments

Once again ,Many thanks
Gemini    27 Dec 2012, 14:04
I have 5 sheets on Excel workbook for Inventory purposes:
1 – Master sheet – in this sheet is the list of items. This sheet is unlock and hidden. This is being updated manually from time to time. It only gives description of an item when an item number on sheet 2 is keyed.
2 – Transaction sheet – in this sheet is where I enter transactions like receiving, usage, returns, etc. This sheet is link to sheet 1 via vlookup on item description. This sheet is lock and the cells for entry are unlock.
3 – Inquiry – This sheet performs all calculations, all cells are lock and the sheet it hidden.
4 – Inquiry Display – This sheet is link to sheet 3. It displays the result of the calculation on sheet 3. This sheet is lock and only 1 cell for query is unlocked. Once the query is found, it displays the selected contents of sheet 3.
5 – Report sheet – I use this sheet to print all items that has stock or out of stock (performs calculation)

Summary:
Only 3 sheets will be displayed on the workbook: sheet 2, sheet 4 and sheet 5.
When sheet 2 is active, calculations on sheet 4 and 5 should be “OFF”.
When sheet 4 or 5 is active, calculations should be “ON”.
The main reason why sheet 4 and 5 calculation should be OFF, is because when keying an item on sheet 2, it turns very slow.

Any solution or suggestion will be appreciated. FYI, I’m not an expert on Excel and VBA.

Thank you in advance.
Ted    14 Jul 2012, 08:07
Excel 2003 How can I plot points on graphs in charts without redrawing the entire chart.Redrawing the graph in real time takes up all my video card memory and stalls the process thus missing data.
 
 

Our Company

Sharon Parq Associates, Inc.

About Tips.Net

Contact Us

 

Advertise with Us

Our Privacy Policy

Our Sites

Tips.Net

Beauty and Style

Cars

Cleaning

Cooking

DriveTips (Google Drive)

ExcelTips (Excel 97–2003)

ExcelTips (Excel 2007–2016)

Gardening

Health

Home Improvement

Money and Finances

Organizing

Pests and Bugs

Pets and Animals

WindowsTips (Microsoft Windows)

WordTips (Word 97–2003)

WordTips (Word 2007–2016)

Our Products

Helpful E-books

Newsletter Archives

 

Excel Products

Word Products

Our Authors

Author Index

Write for Tips.Net

Copyright © 2016 Sharon Parq Associates, Inc.