Reputation: 6272
Is there any way to do that in VBA other than manually looping through the array and testing each element separately?
Upvotes: 0
Views: 2181
Reputation: 8187
Check out A.S.H's answer below, Application.Match
is the way to go. This will throw Error 2042
if the element is not in the array.
Answer mentioned: Checking if Value is Present in an Array
MSDN: https://msdn.microsoft.com/en-us/library/bb239415(v=office.12).aspx
Upvotes: 1