I heart Excel
Board Regular
- Joined
- Feb 28, 2011
- Messages
- 66
Hello,
Sorry to ask again, I really do appreciate your help.
I have a drop down list of names, and want a certain name to bring up a particular hidden field. I currently have the following which keeps erroring. Any ideas?
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$B$9"
If UCase(Target.Value) = "BOBBY BROWN" And "JOHN LENNON" Then
Rows("16:17").EntireRow.Hidden = True
ElseIf UCase(Target.Value) = "ROGER REDHAT" And "JENNIFER YELLOW" Then
Rows("16:17").EntireRow.Hidden = False
End If
Case "$D$19"
If UCase(Target.Value) = "NO" Then
Rows("20:24").EntireRow.Hidden = True
ElseIf UCase(Target.Value) = "YES" Then
Rows("20:24").EntireRow.Hidden = False
End If
Case Else
Exit Sub
End Select
End Sub
Sorry to ask again, I really do appreciate your help.
I have a drop down list of names, and want a certain name to bring up a particular hidden field. I currently have the following which keeps erroring. Any ideas?
Private Sub Worksheet_Change(ByVal Target As Range)
Select Case Target.Address
Case "$B$9"
If UCase(Target.Value) = "BOBBY BROWN" And "JOHN LENNON" Then
Rows("16:17").EntireRow.Hidden = True
ElseIf UCase(Target.Value) = "ROGER REDHAT" And "JENNIFER YELLOW" Then
Rows("16:17").EntireRow.Hidden = False
End If
Case "$D$19"
If UCase(Target.Value) = "NO" Then
Rows("20:24").EntireRow.Hidden = True
ElseIf UCase(Target.Value) = "YES" Then
Rows("20:24").EntireRow.Hidden = False
End If
Case Else
Exit Sub
End Select
End Sub