comparing values from one workbook with another workbook

D

dpdave

I have 2 workbooks. workbook1 contains a list of employees, emp# and date of
hire. Workbook 2 has a differnt list of employees. I need to compare the
emp# in book1 against all emp# in book2. If the emp# from book1 matches the
emp# in book2, I need to copy the date of hire from book1 into the
appropriate cell in book2. I must compare the entire contents of book1
against book2.
 
E

Eduardo

Hi,
I assume employee # is in colum A and the date fo hire in column B so in
book 2 enter

=index(book1!$B$1:$B$10000,match(a1,book1!$A$1:$A$10000,0))

copy formula down, change range to fit your needs
 
F

Fred Smith

You just use Vlookup. Something like:

=vlookup(a1,'[Workbook1.xls]Sheet1'!$A:$D,2,false)

Regards,
Fred
 
F

Francis

Assuming that book1 contain emp# are in col A and date are in col C
and emp# are in col A of Book2

try this in book2 and copy down.

=VLOOKUP(A2,'E:\Documents and Settings\Administrator\My
Documents\NewsGroup\[book1.xls]Sheet1'!$A$1:$C$100,3,0)

Change path and range to suit yours.
take note that both workbook need to be open
--
Hope this help

Please click the Yes button below if this post have helped in your needs

Thank You

cheers, francis
 

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