Hi,
I am currently struggling with a Private Sub Worksheet_Calculate() macro.
I have 3 areas of my worksheet that I wish to hide / unhide under different conditions.
Unfortunately I am struggling to get 3 'IF' statements into the one sub.
Here's what I have:
I have also tried nesting the IF commands - but unfortunately only one of the conditions seem to work.
If anybody could shed some light on this I'd be really grateful as I've spent the past 2 days banging my head against a brick wall!
I am currently struggling with a Private Sub Worksheet_Calculate() macro.
I have 3 areas of my worksheet that I wish to hide / unhide under different conditions.
Unfortunately I am struggling to get 3 'IF' statements into the one sub.
Here's what I have:
Private Sub Worksheet_Calculate()
If Range("B70").Value = "No" Then
Range("71:71", "73:73").EntireRow.Hidden = True
Else
Range("71:71", "73:73").EntireRow.Hidden = False
End If
If Range("F94").Value = "No" Then
Range("86:86", "92:92").EntireRow.Hidden = True
Else
Range("86:86", "92:92").EntireRow.Hidden = False
End If
If Range("E94").Value = "No" Then
Range("68:68", "75:75").EntireRow.Hidden = True
Range("84:84", "86:86").EntireRow.Hidden = True
Else
Range("68:68", "75:75").EntireRow.Hidden = False
Range("84:84", "86:86").EntireRow.Hidden = False
End If
End Sub
I have also tried nesting the IF commands - but unfortunately only one of the conditions seem to work.
If anybody could shed some light on this I'd be really grateful as I've spent the past 2 days banging my head against a brick wall!