Question : Merging Multiple Excel Spread Sheets into one with common fields.

Hello Everyone!

I have been asked to merge 15 or so excel spreadsheets into a one larger one. There is the deal:
- All of the data is hand coded and each sheet represents a table, thus each column is an attribute.
- The first column in every sheet is the primary key
- Some records may exist in multiple sheets via the primary key.
- The columns/attributes excluding the primary key are different among the sheets.

Is there any possible way to do this without haven't to copy and paste each individual cell into a larger sheet?

Answer : Merging Multiple Excel Spread Sheets into one with common fields.

So what's the deal.  Were you able to figure it out.  I recreated a bunch of sheets in excel that had different records but some were matching between sheets and every sheet had different fields.  By importing all the sheets into Access as new tables in the same database, I was able to set up relationships based on the Primary key for each table.  It took me a little over 5 minutes.  I think with 15 spreadsheets it would take 10 to 15 minutes.  The fastest way to do it without coding is to get one list of all your primary keys in a tab and set that up as your master table (in excel).  (The slow part is you have to import each sheet one at a time into Access.)  Once you have imported all sheets into Access then when you go to Querry, ask the Querry wizard to use all the rows or records from the table that has all the records.  You have to assign relationships from all the other tables by dragging the primary keys from all the other tables into the master table and clicking on the Join type button.  Click on the 3rd option that keeps all the records from your master table and leaves blank the fields that are missing.  Just make sure to pull fields in from all your tables and do not check the box to enforce referential integrity.

That will create a sheet with everything on it and you can copy it back to excel.
Please let me know if it works or if you need help.  I'm hoping you'll at least give me a C- on this. :)
Random Solutions  
 
programming4us programming4us