Excel query advice

Posted on 2011-09-29
Last Modified: 2012-05-12
hi all

if i have a column A in excel with stock codes how do i write a query that will do the below for me in column B - i know how to create the connection and write the query i just don't know how to reference an excel entry :@

select QtyOnHand from InvWareouse where Stockcode = "stockcode from excel" and Warehouse= 'GG'
Question by:malraff
LVL 10

Accepted Solution

ukerandi earned 250 total points
ID: 36814375
See below link it will help you. i think you need to write VBA with ADO programme
LVL 37

Expert Comment

by:Neil Russell
ID: 36814468
Where is the Warehouse field?

Can you post a sample spreadsheet file?

Author Comment

ID: 36815275

sorry i thought i could just do some sort of lookup from excel!

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Remove row and column 3 45
Excel file not created as expected 7 48
Cascading dropdown 9 26
Filling Blank Cells 14 17
Introduction This Article briefly covers methods of calculating the NPV and IRR variants in Excel as well as the limitations in calculating and interpreting IRR results. Paraphrasing Richard Shockley, author of my favourite finance reference tex…
Introduction This Article is a follow-up to my Mappit! Addin Article (, it was inspired by an email posting I made to EUSPRIG (, I will briefly cover: 1) An overvie…
This Micro Tutorial will demonstrate the scrolling table in Microsoft Excel using the INDEX function.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now