Excel - Merge rows from 2 XLS files using a common key field.

Asked By Gen on 20-May-08 02:44 PM
I have 2 Excel files with customer records.  Each file has a common customer
number and the other fields are different.  I would like to combine the data
into one file by using the common customer number to link the related records
from the 2 spreadsheets.




ShaneDevenshir replied on 20-May-08 03:16 PM
Hi,

If there is a unique identifier you might consider using
=VLOOKUP(Key,Table,Col,Type)
Where you place the formula in one file and the Key is the common
identifier, Table is the data in the other file (the Key must be found in the
leftmost column of the Table range), Col is the column of the Table you want
to return, counted from left to right in the table range, Type indicates
whether you want an approximate or an exact match, in your case exact, so you
should use False (or 0).

Cheers,
Shane Devenshire
Microsoft Excel MVP