Assume both Book1.xls and Book2.xls are open at the same time
Assume your data is in Sheet1 in both books
(you must always specify the sheetnames involved)
Then in Book2.xls,
in Sheet1,
place in H1: =VLOOKUP(A1,[Book1]Sheet1!A:B,2,0)
Copy H1 down to extract as required. Then freeze the results with an
"in-place" copy n paste special as values. Done.
For a neater look, you could use an ISNA error trap
to return blanks: "" for unmatched cases:
=IF(ISNA(VLOOKUP(..)),"",VLOOKUP(..))
--
Max
Singapore
http://savefile.com/projects/236895
Downloads:27,000 Files:200 Subscribers:70
xdemechanik
---
"Edwin" wrote:
I would like to create a macro that would use the €śjob number€ť located in
workbook 1 cell A1 and use it to find the row that contains the same job
number in a database (workbook 2). Job numbers are located in column A in
workbook 2. Then it will copy the contents of cell B1 from workbook 1 and
paste it in column H of the corresponding job number row in workbook 2