Compare Worksheets

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hope someone can help with this what I'm trying to do is;

Compare a column on a worksheet in Book 1 (Say column A) to a column on
sheet 1 in workbook 2 (Say Column C)
If the value is found in book 2 I want to have the value of column D
populate into book 1 column D

The columns I am comparing are not identical in both books
 
In D1 (oryour first row ... change A1 accordingly) of sheet 1:

=IF(ISNA(VLOOKUP(A1,'C:\Documents and
Settings\John\Desktop\[Book2.xls]Sheet1'!$C:$D,2,0)),"",VLOOKUP(A1,'C:\Documents and Settings\John\Desktop\[Book2.xls]Sheet1'!$C:$D,2,0))

Change filepath as needed
 
One way ..

With Book2.xls open

In Book1.xls,
Data assumed in row2 down

Placed in D2:
=IF(ISNA(MATCH(A2,[Book2]Sheet1!$C:$C,0)),"",INDEX([Book2]Sheet1!$D:$D,MATCH(A2,[Book2]Sheet1!$C:$C,0)))
Copy down as far as required
 

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

Back
Top