Put this worksheet event in the Sheet for which it applies.
Open the VBE, clicking on Alt F11
In the left window, click on the sheet where you are applying these actions
A new right window will open. Copy the code and paste it in
Save and close the VBE
Private Sub Worksheet_Change(ByVal Target As Range)
If Intersect(Target, Range("D2")) Is Nothing Or Target.Cells.Count > 1 Then Exit Sub
If Target.Value = "Test" Then
MsgBox ("message1")
ElseIf Target.Value = "Actual" Then
MsgBox ("message2")
ElseIf Target.Value = "Old" Then
Exit Sub
End If
End Sub
Bookmarks