View Single Post
  #7   Report Post  
Posted to microsoft.public.excel.programming
onedaywhen onedaywhen is offline
external usenet poster
 
Posts: 459
Default Querying a database for values in each row

I understand your problem. To recap, the solution is to join your
Excel table to your external database table then update your Excel
table with the generated recordset. But first you will have to get
both tables in the same place. I can elaborate but first tell me:

1) the external database (MS Access, SQL Server, another Excel
workbook etc)
2) how often you plan to do this e.g. is it a one-off exercise or a
regular application function.

--

Stephen Goldfinger wrote in message ...
Thanks for taking the time to reply. Your assessment is right on the
mark. Here is an example (I hope they line up well.)

Lookup Lookup
Column 1 Column 2 Result
-------- -------- ------
A1 A2 R1
B1 B2 R2
C3 C3 R3

Explanation: Given the combination of values (A1 and A2), I can
determine the SINGLE result value, R1. Each combination of Column 1 and
Column 2 will return a singleton value.

Given what I know of Excel, I can write a query that takes the values of
the first row (i.e. A1 & A2) to then go get the resulting value R1. I
can then write another query for (B1 & B2) to get me R2. I don't want
to have to write multiple queries. I want one query (or a function)
that can take the Column 1 and Column 2 values for each row and get me
the Result value for that particular row.

I hope this clarifies the question.

Thanks.


*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!