retieving data from a sql table

C

cmr

Hi,

I'd like to be able to automatically fill certain columns in excel
with data from an SQL table. For example, I have a column called "item
code" and I'd like the columns "item description" and "item cost" to
be automatically retrieved from an SQL table when the user inputs the
item code. I'm having trouble in two areas. One, getting it to perform
automatically once the data is inputed, and filtering the records to
include only the description and cost for that specific item code.
I've tried using macros and the "Get External Data" in the Data menu.
I haven't been able to succeed in passing the value of the "item code"
cell as a parameter. I'd appriciate any help whatsoever, and I thank
you in advance.
 
S

scott

Using Get External Data, after you go through the selection Edit the
query is MS Query. In the item code column enter [enter item code.
This should bring up the screen for prompting. Return the data to Excel
and move the cursor into the data query area and go to Get External Data
and choose Parameters and you should be enter to your cell in "Get the
value from the following cell" and check the Refresh automatically option.

The only issue with this is that the last update I did now prompts when
opening the workbook, asking the user to enable auto refresh.


HTH.
 

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