Option Explicit
Private Sub Worksheet_Change(ByVal Target As Range)
Dim CheckRange As Range
Dim Count As Long
Set CheckRange = Range("A1:A10")
Count = Application.WorksheetFunction.CountIf(CheckRange, Target.Text)
If Count > 0 Then
MsgBox Target.Text & " is in the range " & CheckRange.Address(False, False)
Else
MsgBox Target.Text & " is not in the range " & CheckRange.Address(False, False)
End If
End Sub