Merge two files based on one column

M

Marc

Hi, I have the following two files

File 1:
Column1, Column2, Column3, Column4, Column5
SSN1, First1, Last1, Street1, Zip1
SSN2, First2, Last2, Street2, Zip2
SSN3, First3, Last3, Street3, Zip3

File 2:
Column1, Column2, Column3, Column4
SSN1, City1, State1, Country1
SSN2, City2, State2, Country2
SSN3, City3, State3, Country3

I need to merge the two files based on Column1. How do I do that? Vlookup
only lets me add one column in file1. I want to merge both files based on SSN.
 
J

joel

You need to use 4 vlookups. One for each new column with the colum
number different in each Vlookup
 
J

joel

Yes you can do what you want with a macro. Your posting was in
miscellaneous goup where people don't normally want a macro solution.
Can you answer a few questions so I can write the macro.

1) What extensions are your source files. Are they CSV or XLS?

2) What type file do you want the results to appear? (xls or CSV).

3) Where do you want the results put. In a 3rd file or in one of th
two source files?

4) Can you specify the Sheet names where the data is located (from/to
if you are using XLS file(s).

5) Where do you want the macro put. In one of the source files, th
Destination file, or in a file where there is no data. The macro mus
be in a XLS file since CSV files are just text files and cannot contai
a macro.

I'll have the macro open a dialog box that will allow you to select th
source and or destination files where the results are stored
 
Top