VBNewbiwe83
New Member
- Joined
- Aug 29, 2018
- Messages
- 11
Hi,
I am trying to hide rows 78 to 84 if cell C75 is populated with 'Hold', 'Insolvency' or 'other' and show if any other option is selected 'Plan' or 'SST' but it is hiding only row 79 and 80. Can anybody help?
Thanks
I am trying to hide rows 78 to 84 if cell C75 is populated with 'Hold', 'Insolvency' or 'other' and show if any other option is selected 'Plan' or 'SST' but it is hiding only row 79 and 80. Can anybody help?
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address(0, 0) = "C75" Then
ActiveSheet.Unprotect "Experience"
Select Case Target
Case "Hold", "Insolvency", "Other": ActiveSheet.Rows("78, 79, 80, 81, 82, 83, 84").EntireRow.Hidden = True
ActiveSheet.Protect "Experience", True, True
End Select
End If
End Sub
Thanks
Last edited: