View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
dan dan is offline
external usenet poster
 
Posts: 866
Default IF statement to check against list of values

I'm looking to right an if statment in VBA that accomplishes this;

IF var1 IN ("XXX", "YYY", "ZZZ") THEN
DoThing1
ELSE
DoThing2
Endif

I tried it as above, and it didn't like the use of "IN"