Hi, I have the following code:
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("a15").Value = "Exempt" And Range("F6").Value = "Exempt" Then
Rows("19").EntireRow.Hidden = True
Rows("21").EntireRow.Hidden = True
ElseIf Range("a15").Value = "Exempt" And Range("F6").Value = "Non-exempt" Then
Rows("19").EntireRow.Hidden = False
Rows("21").EntireRow.Hidden = False
ElseIf Range("a15").Value = "Non-exempt" And Range("F6").Value = "Exempt" Then
Rows("19").EntireRow.Hidden = False
Rows("21").EntireRow.Hidden = False
End If
End Sub
I need to add a second Worksheet_change but I get the error ambiguous name detected vba - where do I change my code name? Thank you!!!
Private Sub Worksheet_Change(ByVal Target As Range)
If Range("a15").Value = "Exempt" And Range("F6").Value = "Exempt" Then
Rows("19").EntireRow.Hidden = True
Rows("21").EntireRow.Hidden = True
ElseIf Range("a15").Value = "Exempt" And Range("F6").Value = "Non-exempt" Then
Rows("19").EntireRow.Hidden = False
Rows("21").EntireRow.Hidden = False
ElseIf Range("a15").Value = "Non-exempt" And Range("F6").Value = "Exempt" Then
Rows("19").EntireRow.Hidden = False
Rows("21").EntireRow.Hidden = False
End If
End Sub
I need to add a second Worksheet_change but I get the error ambiguous name detected vba - where do I change my code name? Thank you!!!