+ Reply to Thread
Results 1 to 8 of 8

One Sheet Manual Calculation

Hybrid View

  1. #1
    Forum Contributor
    Join Date
    06-15-2007
    Location
    Scotland
    Posts
    142

    One Sheet Manual Calculation

    Hello
    I have a workbook with 4 sheets, all of then have formulas
    What I would like to do is:
    When I open the workbook I would like to make enable all sheets for calculations except 1, for example.
    Sheet1, 2,3 has to be enable to automatic calculation all the time
    But sheet4 only when I click a button or a check box, otherwise is disable
    Does anybody have tried something similar before?
    Can this be possible to achieve?

    Many thanks and best regards

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    Not going to happen.

    You can set calculation to Manual before opening the workbook, and then selectively calculate whatever you want (a sheet, a range, a cell). See Help for the Calculate method.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Forum Contributor
    Join Date
    06-15-2007
    Location
    Scotland
    Posts
    142
    Hi SHG, I was thinking to do something like you proposed. but I do not know how to call the secod sub when any change happen in the workbook.
    any hint in that sense will be great

    'First part when the workbook is opened
    Private Sub Workbook_Open()
        'To disable Excel Automatic Calculation then all sheet are frozen
        With Application
            .Calculation = xlManual
            .CalculateBeforeSave = False
        End With
        'making sure that check box is false
        Sheet1.CheckBox1.Value = False
        Sheet1.Range("M2") = "FALSE"
        
        'to calculate only the sheets with the true condition when the workbook is open
        'sheet3 and 4 to update results
        Sheet3.Calculate
        Sheet4.calcualate
        'sheet 1 to update results
        Sheet1.Calculate
    End Sub
    
    
    'second part
    'This is the bit that I do not know how to do it
    'When any change happen in the workbook any of the sheets even shhet 2
        'calculate only the sheets with the true condition stated in sheet1(eg. sheet3 and 4 first to update results)
        'Sheet3.Calculate
        'Sheet4.calcualate
        
        'check if sheet2 has to be calculated (if the user tick the check box
        'If Sheet1.Range("M2") = "TRUE" Then
        '    Sheet2.Calculate
        'Else
        'End If
        
        'sheet 1 to update all results from sheet2,3,4
        'Sheet1.Calculate
    
    'End
    Last edited by mmf; 12-19-2008 at 11:58 AM.

  4. #4
    Registered User
    Join Date
    08-05-2009
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: One Sheet Manual Calculation

    Would it be possible to turn it on and off based on which worksheet is activated?

    E.g., Activating sheet one would turn on automatic calculation. Activating sheet two would turn it off. Switching back would turn it back on.

    Hope it's ok to wake up this old thread.

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: One Sheet Manual Calculation

    oOarthurOo, time to get reacquainted with the forum rules, and then start your own thread,

  6. #6
    Registered User
    Join Date
    08-05-2009
    Location
    Winnipeg, Canada
    MS-Off Ver
    Excel 2003
    Posts
    61

    Re: One Sheet Manual Calculation

    At the time of posting, I was aware of rule 2:
    Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.
    I decided it was likely appropriate to post in the thread since I have a suggested solution. Granted, not certain if the idea will work, thus phrased it as a question. But this is what I had in mind:
    Private Sub Worksheet_Activate()
    Application.Calculation = xlCalculationManual
    End Sub
    
    Private Sub Worksheet_Deactivate()
    Application.Calculation = xlAutomatic
    End Sub
    Of course, I will defer to your (or other mods) judgement on whether this comment requires a new thread.
    Last edited by oOarthurOo; 04-19-2010 at 02:14 PM. Reason: typo in code, missing x

  7. #7
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    21,971

    Re: One Sheet Manual Calculation

    Since we're here though, you can disable calculation for an individual worksheet.
    Everyone who confuses correlation and causation ends up dead.

+ 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