ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   How do I merge 2 workbooks by comparing one column (https://www.excelbanter.com/excel-worksheet-functions/116052-how-do-i-merge-2-workbooks-comparing-one-column.html)

Sadiya Bilgrami

How do I merge 2 workbooks by comparing one column
 
I have 2 workbooks and each of them has 2 columns ITEM and DESCRIPTION. I
want to compare the item numbers and if the item nubers match want copy the
decription from workbook 2 to workbook 1 beside the description in workbook 1.

Thanks.

Richard Buttrey

How do I merge 2 workbooks by comparing one column
 
On Wed, 25 Oct 2006 07:25:02 -0700, Sadiya Bilgrami <Sadiya
wrote:

I have 2 workbooks and each of them has 2 columns ITEM and DESCRIPTION. I
want to compare the item numbers and if the item nubers match want copy the
decription from workbook 2 to workbook 1 beside the description in workbook 1.

Thanks.


In C2 of Wb1 (assuming field names are in A1:B1) enter

=IF(ISERROR(VLOOKUP(A2,[Book2]Sheet1!$A$1:$B$15,2,FALSE)),"",VLOOKUP(A2,[Book2]Sheet1!$A$1:$B$15,2,FALSE))

and copy down as required.

HTH


__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________


All times are GMT +1. The time now is 08:58 AM.

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