Unhiding Sheet based on the result of cell IF formula

  • Hello gurus, I am trying to unhide a sheet when 6 conditions have been met, I'm using an IF formula to return "Yes" or "No" when those conditions are met. Explanation of conditions that must be met in the attached workbook...Cell D2 is the sum of CheckBox 3 & 4, there must be a name in A7 & A9, there must be a date in B7 & B9. F3 is the result of the Formula. I cannot seem to get the code working, if you have a better approach at what I'm trying to accomplish, by all means post it up.


    I have tried the following in the worksheet...


    Code
    1. Private Sub Worksheet_Calculate()
    2. If Me.Range(F3) = "Yes" Then
    3. Sheets("Sheet2").Visible = True
    4. Else
    5. Sheets("Sheet2").Visible = False
    6. End If
    7. End Sub


    I have tried the following in the workbook



    Any and all suggestions greatly appreciated.


    Joe


    Admins, my apologies, I should have created this in the Excel VBA/Macros section.

  • Re: Unhiding Sheet based on the result of cell IF formula


    Thank you sir, for your time and assistance, however, the order of events are as follows, the CheckBoxes are checked first, for instance CB3 would be "Does NOT effect others" CB4 would be "Is NOT Recordable" then those CBs would require signature sign off (via userform and password) and the date that the evaluation was made.


    In that order, the checkbox would have to be "rechecked" in the code you gave above, after all conditions were met, my apologies for the lack of communication.

  • Re: Unhiding Sheet based on the result of cell IF formula


    Just tried this approach, and it works when F3 goes from Yes to No, until I uncheck one of the checkboxes, sheet 2 remains visible, any ideas??


    Code
    1. Private Sub Worksheet_Change(ByVal Target As Range)
    2. If [F3] = "Yes" Then
    3. Sheets("Sheet2").Visible = True
    4. Else
    5. Sheets("Sheet2").Visible = False
    6. End If
    7. End Sub