ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Use data from access in a cell (https://www.excelbanter.com/excel-discussion-misc-queries/157042-use-data-access-cell.html)

BMC

Use data from access in a cell
 
I need to pull some data from Access into Excel, but it's more complicated
than getting the whole table.

I've got a spreadsheet, and I need one cell to pull a value from an access
db based on the value in another cell in the row: One of the columns in the
sheet contains a unique serial number, and the cell should contain the value
of another field from a record in the db which has the corresponding serial
number.

I'm guessing I should be able to do something like "SELECT assets.hostname
from assets where assets.serial = A2", but how?

I can't use the SQL.REQUEST function as I'm using Office 2007.

Duke Carey

Use data from access in a cell
 
See Nick Hodges' site for an explanation of how to do this

http://www.nickhodge.co.uk/gui/datam...taexamples.htm

"BMC" wrote:

I need to pull some data from Access into Excel, but it's more complicated
than getting the whole table.

I've got a spreadsheet, and I need one cell to pull a value from an access
db based on the value in another cell in the row: One of the columns in the
sheet contains a unique serial number, and the cell should contain the value
of another field from a record in the db which has the corresponding serial
number.

I'm guessing I should be able to do something like "SELECT assets.hostname
from assets where assets.serial = A2", but how?

I can't use the SQL.REQUEST function as I'm using Office 2007.



All times are GMT +1. The time now is 12:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com