I have been asked to create a check sheet where D16 is a drop-down data validation with 26 options, our of those options there are 6 options that do not require addition cells to updated and I would like to hide the rows that contain these calls.
There are two instances of this type of scenario in the same sheet based on different drop downs.
I have currently got the below code which some times (?) works can this be made simpler?
Thanks as always in advance.
There are two instances of this type of scenario in the same sheet based on different drop downs.
I have currently got the below code which some times (?) works can this be made simpler?
Thanks as always in advance.
Code:
Private Sub Worksheet_Change(ByVal Target As Range)
ActiveSheet.Unprotect Password:="bunny"
Select Case Target.Address(False, False)
Case "D16"
Rows(24).Hidden = Target.Value <> "Maintenance Inclusive Lease"
Rows("18:20").EntireRow.Hidden = Target.Value = "Cash"
Rows("18:20").EntireRow.Hidden = Target.Value = "Cash - 3rd Party"
Rows("18:20").EntireRow.Hidden = Target.Value = "PO Only"
Case "J32"
Rows(48).Hidden = Target.Value <> "Minimum Bill"
End Select
ActiveSheet.Protect Password:="bunny"
End Sub