TRy-
Sub foo()
Dim vals As Variant
vals = Array("5", "9", "12", "-1")
Dim LastRow As Integer
Dim i As Long
LastRow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow
If IsInArray(ActiveSheet.Range("A" & i).Value, vals) Then
ActiveSheet.Range("B" & i).Value = "Value Exists"
End If
Next i
End Sub
Function IsInArray(key As Variant, arr As Variant) As Boolean
IsInArray = (UBound(Filter(arr, key)) > -1)
End Function
Ref. HERE
UPDATED
Sub foo()
Dim vals As Variant
vals = Array("5", "9", "12", "-1")
Dim LastRow As Integer
Dim i As Long
LastRow = ActiveSheet.Range("A" & Rows.Count).End(xlUp).Row
For i = 2 To LastRow
If Not IsEmpty(ActiveSheet.Range("A" & i)) Then
If IsInArray(ActiveSheet.Range("A" & i).Value, vals) Then
ActiveSheet.Range("B" & i).Value = "Value Exists"
End If
End If
Next i
End Sub
Function IsInArray(stringToBeFound As Variant, arr As Variant) As Boolean
IsInArray = (UBound(Filter(arr, stringToBeFound)) > -1)
End Function