Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I am trying to embed a microsoft query within an excel spreadsheet, that passes several parameters from the spreadsheet to the query. I would like the microsoft excel query function to find a few values in cells on the worksheet and pass them into the SQL code. I used this approach, but I could only understand how to pass a single parameter using the ?. I would like to pass about 3 or 4 parameters, and some of them are used in multiple places in the query. The query doesn't seem to be editable using the query builder in ms query so I wrote it in sql using a text editor.

Note: other than SQL select queries, I'm not much of a programmer so if there is a point and click way to do this (i.e. something that does not require visual basic) that would be especially helpful.

share|improve this question
This is very trivial to do with VBA. Without it, I'm not sure how unfortunately. – Breakthrough Aug 3 '11 at 23:05

You can try this in SQL view, then Excel will prompt you to select the referring cells:

where (CustomerID = ?) AND (xxx = ?) AND (zzz = ?)
share|improve this answer

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .