Skylar
asked on
How to Merge all Excel Tables into a single Table.
I have excel files in a single folder. each of those excel files has multiple sheets with data, the data are in form of simple data and "Excel Tables" like shown in the screenshot.
I need to marge all of the Tables only into a single Table in a master Sheet.
So, I need help with a code that loops through all workbooks in a folder and searches for Tables and then combines all of the table into one giant table and puts this giant table into a new workbook. all of the tables has the identical number of columns and column headers. the column headers should be duplicated in the merged Table.
I have also attached the two example excel files that have tables in them.
I am doing this manually. I got some codes from searching, but they are all combining everything and I could not find something particular that combines only Tables i would greatly appreciate any help to automate this using VBA.
Book1.xlsx
Book2.xlsx
I need to marge all of the Tables only into a single Table in a master Sheet.
So, I need help with a code that loops through all workbooks in a folder and searches for Tables and then combines all of the table into one giant table and puts this giant table into a new workbook. all of the tables has the identical number of columns and column headers. the column headers should be duplicated in the merged Table.
I have also attached the two example excel files that have tables in them.
I am doing this manually. I got some codes from searching, but they are all combining everything and I could not find something particular that combines only Tables i would greatly appreciate any help to automate this using VBA.
Book1.xlsx
Book2.xlsx
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Roy,
Thank you so much. It worked.
Only it did not put the headers at the top, which i can put manual. but would have been great if the code would have put the header from any of the tables. because all headers are the same in all tables.
Thank you so much. It worked.
Only it did not put the headers at the top, which i can put manual. but would have been great if the code would have put the header from any of the tables. because all headers are the same in all tables.
I could change the code to copy the first Table with headers, I just thought it simpler to prepare the master sheet manually first.
ASKER
Thank you Roy.
Do you want to copy the first table completely so that the headings are imported?
ASKER
Thanks Roy.
Yes, I want to copy the first table completely so that the headings are imported
Yes, I want to copy the first table completely so that the headings are imported
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Roy
Hi Skylar
Is working as expected now?
Is working as expected now?
ASKER
this latest code throws error
and i tried now with the original code https://www.experts-exchange.com/questions/29129095/How-to-Merge-all-Excel-Tables-into-a-single-Table.html?anchorAnswerId=42753688#a42753688 this one also throws error stating that file does not exist while in fact the file does exist.
and i tried now with the original code https://www.experts-exchange.com/questions/29129095/How-to-Merge-all-Excel-Tables-into-a-single-Table.html?anchorAnswerId=42753688#a42753688 this one also throws error stating that file does not exist while in fact the file does exist.
Can you attach the workbook
ASKER
I have attached both codes with its sample data.
the original file with its sample data
https://www.dropbox.com/s/tuvm61lqak2t9l3/Original%20Macro%20with%20its%20samplefiles.zip?dl=0
the latest code with its sample data
https://www.dropbox.com/s/wmqpz9gzt9xcni6/Modified%20Macro%20include%20header.zip?dl=0
the original file with its sample data
https://www.dropbox.com/s/tuvm61lqak2t9l3/Original%20Macro%20with%20its%20samplefiles.zip?dl=0
the latest code with its sample data
https://www.dropbox.com/s/wmqpz9gzt9xcni6/Modified%20Macro%20include%20header.zip?dl=0
I'll go through them later
ASKER
Thanks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Roy,
Thank you so very much! it worked.
Thank you so very much! it worked.
Pleased to help.
Will each sheet contain only one Table?