0
votes

In Excel I have two Workbooks:

  1. partial.xls with two columns: Name and City
  2. general.xls with more columns: Name; Address; City.

In general.xls there are records in the column Name.
In partial xls there are records in the columns Name and City. In the Name columns in both files are more identical items arranged different. Please, how could I merge records from partial.xls to general.xls?

For example:

In general.xls:
Column Name has the records: Name1; Name2; Name3 (in this order)
Columns Address and City are empty.

In partial.xls:
Column Name has the records Name3; Name1; Name2 (in this order)
Column City has the records: City3; City1; City2 (in this order)

1
I try to copy records from a table in a xls file into a table in another xls file. Both tables have a common column with rows having same records, but in different order. (This colum named Names can be use as keys).Daniel Munteanu

1 Answers

0
votes

Use a lookup formula like Vlookup or Index/Match.

In General.xls

=Vlookup(A1,[Partial.xls]Sheet1!$A$1:$C$1000,3,False)

In words: Find the name in A1 in Sheet1 of the Partial.xls workbook, A1 to A1000 and return the value from column C of the row where an exact match is found.