Linking data across workbooks

G

Guest

I have a workbook that other folks "update", but I need to pull over some of
the data from that workbook. My problem is:

In workbook A, user will update key columns.

In workbook B, I need to pull in data from workbook A, but they must line up
with the data in book B.

In Workbook B, I need to:
Check A2:A50 for a value,
Find that value in Workbook a, sheet a
Once it finds the value, pull in the value under columns AX and Bx in to
the workbook B.

I need to do this for each value in A2:A50. Workbook A, will only ever have
1 occurence of any value in A2:A50, but may not have all the values in A2:A50

Any ideas? I don't even know where to start!

KSL
 
G

Guest

With the source Book1.xls open,

In Book2.xls, in Sheet1 (say),
you have the key col values in A2 down

In B2:
=INDEX([Book1]Sheeta!$AX:$AX,MATCH(A2,[Book1]Sheeta!$A:$A,0))

In C2:
=INDEX([Book1]Sheeta!$BX:$BX,MATCH(A2,[Book1]Sheeta!$A:$A,0))
Select B2:C2, copy down to C50 to return required results from cols AX and
BX in Sheeta of Book1.xls.

And if you want an error trap to return neat "blanks" ("") for any
non-matching cases, you could use an IF(ISNA .. construct (just need to trap
the MATCH part of it):

IF(ISNA(MATCH(...)),"",INDEX(...,MATCH(...)))

Applied here, you could use these 2 expressions instead:

In B2:
=IF(ISNA(MATCH(A2,[Book1]Sheeta!$A:$A,0)),"",INDEX([Book1]Sheeta!$AX:$AX,MATCH(A2,[Book1]Sheeta!$A:$A,0)))

In C2:
=IF(ISNA(MATCH(A2,[Book1]Sheeta!$A:$A,0)),"",INDEX([Book1]Sheeta!$BX:$BX,MATCH(A2,[Book1]Sheeta!$A:$A,0)))
 

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