SQL Query with constraint in a cell



Excel 2007: I am pulling data from an external source (Data ribbon, From
Other Sources, From SQL Server) using a query:

Select * from Transactions where TransType = 'NEW'

I'd like to put the value of TransType in a cell, so I can change the value
in the workbook, <Refresh ALL>, and the query runs with a different

Is this possible? How do I pass the value of a cell to the query? I prefer
to NOT use VB, a form, or a macro.

Thanks! in advance.





I may well be wrong here but I'm not sure that you can avoid using VB for
this?? Your command text would be dependant on a value held within your
worksheet so this would need to be constructed each time you update the

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question