ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   comparing values from one workbook with another workbook (https://www.excelbanter.com/excel-discussion-misc-queries/255901-comparing-values-one-workbook-another-workbook.html)

dpdave

comparing values from one workbook with another workbook
 
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.

Eduardo

comparing values from one workbook with another workbook
 
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

"dpdave" wrote:

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.


Fred Smith[_4_]

comparing values from one workbook with another workbook
 
You just use Vlookup. Something like:

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

Regards,
Fred

"dpdave" wrote in message
...
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.



francis

comparing values from one workbook with another workbook
 
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





"dpdave" wrote:

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.



All times are GMT +1. The time now is 04:14 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com