Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

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
1  
This is very trivial to do with VBA. Without it, I'm not sure how unfortunately. –  Breakthrough Aug 3 '11 at 23:05

1 Answer 1

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

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.