xls Cell reference in an SQL statement

G

Gaston WATTIEZ

I want to make a reference of a cell within an SQL
statement.

e.g.
Select * from table
when table.fields = Sheet1!A1

Could you give me a correct example of statement ?

Thank a lot in advance,
Gaston
 
D

Dick Kusleika

Gaston

Are you using Data - Get External Data to make a QueryTable? If so, open
the query in MSQuery and add a criteria. Something like [Enter criteria].
The [] make it a prompt. Then, in Excel, the Parameters button the External
Data Toolbar will be enabled and you can change from a prompt to a cell on
the sheet.
 

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

Top