View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default "IN" comparison operator

Sub Tester1()
v = Array("dog", "cat", "barn", "house", "home")
res = Application.Match("house", v, 0)
If Not IsError(res) Then
MsgBox "House is item number: " & res
Else
MsgBox "House not found"
End If


End Sub


--
Regards,
Tom Ogilvy



"Jared" wrote in message
...
I know VBA doesn't have an "IN" comparison operator like many languages. I
was wondering if there is a function that has been written that emulates
"IN".