View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
Marcus Langell
 
Posts: n/a
Default Microsoft Query parameter - "is one of"

I have a query in Excel that uses a parameter in a cell. Previously I just
had an "equal to" operator in Microsoft Query which worked fine. For example
the field Unit should be equal to the parameter value. Nothing strange.

However, now I want to use an "in" (or "is one of") operator instead and
send in a string to put within the "in" statement. So I have IN([parameter])
in the query. This works fine when I send in just one value, like "A", but if
I try to use several, like "A,B,C", it doesn't work. Does anyone have an idea
for how I should pass a parameter with several choices for the "IN" operator?
I don't want to create several parameters and OR statements in the query
because I want it to be dynamic in number of choices. Thanks in advance!

/Marcus