When my Target Value equals the exact wording in the dropdown, the messagebox will popup; however, they can select several that start with Y - it's also a named range called "HTSPopup". How do I have the message box pop-up if the user selects anything that starts with Y or matches the named range?
Here is my code:
Private Sub Worksheet_Change(ByVal Target As Range)
Dim Range1 As Range
Dim lrdp As Long
lrds = Me.Cells(Me.Rows.Count, "A").End(xlUp).Row
Set Range1 = Me.Range("AJ1:AJ" & lrds)
If Not Intersect(Range1, Target) Is Nothing Then
'Rule for Range1
If Target.Value = "Y- Escalated by Patient" Then
If msgbox("Enter now into HTS Template?", vbInformation + vbYesNo, "Go now") = vbYes Then
If Sheets("HTS Template").Visible = False Then Sheets("HTS Template").Visible = True
Sheets("HTS Template").Select
End If
End If
End If
End Sub