Query SQL Server from Excel

D

Doctorjones_md

I'm wondering how best to achieve this -- I have an INSERT INTO statement
which exports data from my Excel worksheet to SQL Server, but I'm not sure
how I can query/retrieve this data from SQL Server, and have it populate the
EXACT cell from which it originated.

For example --
--- On one worksheet, I enter data (or select an item data from a drop-down
menu)
--- then on another worksheet, I present the data in cells based on
conditional =IF formulas [=IF('Products'!G14="No Account","Sample
Customer",'Products'!G14)], and perform some calculations using additional
=IF formulas [=IF(H17>0,H17*B17,G17*0.8)]
--- Finally, on an additional worksheet, I render the data which will be
pushed to SQL Server with conditional =IF formulas such as
[=IF(Configurator!D48=TRUE,"Generic","No Product")]

I went here and read Chip Pearson and Dave Peterson's comments on the
ability to delete data without deleting the formula:
http://www.eggheadcafe.com/software/aspnet/28867965/lock-in-formula.aspx

Is there a way that I can retrieve data from SQL Server and present it in
it's original location on an Excel worksheet to perform additional
calculations/analysis?

Thanks in advance for all advice and suggestions
 
N

Nick Hodge

Maybe the SQL.REQUEST worksheet function from the XLODBC.xla add-in would
help. Look it up in help

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
(e-mail address removed)
www.nickhodge.co.uk
 

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