Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 109
Default "IN" comparison operator

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".
  #2   Report Post  
Posted to microsoft.public.excel.programming
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".



Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Text "comparison" operator for "contains" used in an "IF" Function Pawaso Excel Worksheet Functions 4 April 4th 23 11:35 AM
Comparison Operator "" NOT "=" monir Excel Discussion (Misc queries) 4 October 22nd 07 02:42 AM
Is it possible to apply IF's to "operator" result.. nastech Excel Discussion (Misc queries) 3 August 11th 06 02:12 PM
program stuck at "Save Cancelled by Operator" MainelyPat Excel Discussion (Misc queries) 3 April 20th 06 06:23 PM
Excel no longer allows new formulas with division "/" operator SA Excel Programming 1 November 1st 03 07:07 AM


All times are GMT +1. The time now is 06:20 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"