View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.misc
[email protected] nicolai@sympatico.ca is offline
external usenet poster
 
Posts: 6
Default How can I combine multiple csv files with different number of records?

I have a number of csv files that I would like to combine into one
spreadsheets. The problem is that not all the data is consistent. Here
is an example of what they look like:

File1:
Country Population
Armenia 100
Bangladesh 220
Cuba 103
Denmark 98

File2:
Country GDP
Armenia 12
Bangladesh 33
Denmark 48

etc, etc for about 300 countries

As you will notice, File 2 has no data for Cuba. I want to combine all
the data into one spreadsheet. If all countries were represented in
every file I would simply copy and paste the entire column, but that
wont work as the columns are never the same length.

by combining file 1 and 2 I would like to get the following

Country Population GDP
Armenia 100 12
Bangladesh 220 33
Cuba 103
Denmark 98 48




Any ideas on a quick clever way to do this?