Hi all,
I am trying to hide cells depending on a selection of a drop down.
I have pulled together the below (which doesn't work), and being pretty much clueless i don't know how to fix it.
Private Sub Worksheet_Change(ByVal Target As Range)
If Target.Address = "$D$8" Then
If Range("D8").Value = "Warehouse_and_Light_Industrial" Then
Rows("13:14").EntireRow.Hidden = False
ElseIf Range("D8").Value = "Office" Then
Rows("13:14").EntireRow.Hidden = True
ElseIf Range("D8").Value = "Shop" Then
Rows("13:14").EntireRow.Hidden = True
ElseIf Range("D8").Value = "Care_homes_for_the_elderly" Then
Rows("13:14").EntireRow.Hidden = True
ElseIf Range("D8").Value = "Community_centres_and_General_purpose_halls" Then
Rows("13:14").EntireRow.Hidden = True
ElseIf Range("D8").Value = "Sports_or_recreational_facillities" Then
Rows("13:14").EntireRow.Hidden = True
ElseIf Range("D8").Value = "Schools/Nurseries" Then
Rows("13:14").EntireRow.Hidden = False
End If
End If
End If
End If
End If
End If
End If
End Sub
The idea is that when either the choices of Warehouses and light industrial or Schools/Nurseries are selected rows 13:14 are shown. The rest of the time they are hidden.
Any help[ would be appreciated.
Thanks,
Joe
Bookmarks