Need help with Macro - merging multiple excel into multiple excel placed in multiple folder

ankit1990

New Member
Joined
Aug 24, 2016
Messages
4
Hi,

Need help with Macro. I have many excels in many subfolder. They are all part of one Parent folder. Each subfolder has two excels. The name of each subfolder starts with same word as the first word of excel that subfolder holds. Each excel has one worksheet only.

I need a macro that runs across each subfolder, merge the excels in that subfolder in a new consolidated excel with two worksheets (one worksheet each for one excel workbook). The macro then closes the consolidated excel and moves to another subfolder. Thus, in the end, each subfolder will have one consolidated excel workbook.

Parent Folder Name "Output"
Sub Folder = A
Excel in Subfolder A = "A Data One 08-25-16.xls" and "A Data Two 08-25-16"
Sub Folder = B
Excel in Subfolder B = "B Data One 08-25-16.xls" and "B Data Two 08-25-16"
Sub Folder = C
Excel in Subfolder C = "C Data One 08-25-16.xls" and "C Data Two 08-25-16"


Output required
Excels in Subfolder A = "A Data One 08-25-16.xls" and "A Data Two 08-25-16" and "A Consolidated 08-25-16"
Excels in Subfolder B = "B Data One 08-25-16.xls" and "B Data Two 08-25-16" and "B Consolidated 08-25-16"
Excels in Subfolder C = "C Data One 08-25-16.xls" and "C Data Two 08-25-16" and "C Consolidated 08-25-16"

Please help.
 

Excel Facts

Formula for Yesterday
Name Manager, New Name. Yesterday =TODAY()-1. OK. Then, use =YESTERDAY in any cell. Tomorrow could be =TODAY()+1.

Forum statistics

Threads
1,215,879
Messages
6,127,518
Members
449,385
Latest member
KMGLarson

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top