By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
435,089 Members | 2,226 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 435,089 IT Pros & Developers. It's quick & easy.

VBA Equivalent of SQL Not In

100+
P: 124
What is the vba equivalent of the SQL not in? I'm writing an if statement and I want to say If [variable] not in [comma-separated string] Then...
Thanks!
Apr 28 '10 #1

✓ answered by missinglinq

If I understand your question correctly, you could use

If InStr([comma-separated string], Variable) = 0 Then

Linq ;0)>

Share this Question
Share on Google+
4 Replies


missinglinq
Expert 2.5K+
P: 3,532
If I understand your question correctly, you could use

If InStr([comma-separated string], Variable) = 0 Then

Linq ;0)>
Apr 28 '10 #2

100+
P: 124
That's it! Thank you!
Apr 29 '10 #3

missinglinq
Expert 2.5K+
P: 3,532
Glad we could help!

Linq ;0)>
Apr 29 '10 #4

100+
P: 124
I had another question related to this but I figured it out.
May 25 '10 #5

Post your reply

Sign in to post your reply or Sign up for a free account.