Require Macro to Open Workbook from a folder and copy contents

ragav_in

Board Regular
Joined
Feb 13, 2006
Messages
89
Office Version
  1. 365
  2. 2016
Platform
  1. Windows
Hi All,

I have a scenario where I need to consolidate data from multiple workbooks/worksheets onto a single worksheet in a different workbook for reconciliation purposes. The scenario is such that the consolidated data will be of the same format as the individual work books. We need to provide the path of individual files to a cell in the Consolidated Workbook and the macro should open all the files in the folder and copy the rows of data and paste it one after another in the consolidated workbook. Once all the data from all individual files is copied a message that copying is complete has to be displayed.

Can anyone help me with the macro to accomplish the situation in hand. Consolidating manually will take long time (hundreds of individual files are present) and hence I would want a macro to finish this task without any error.

Sequence:
1. Put all the individual files in a folder (D:\For Consolidation\Macro\Sep11)
2. Open the file with the Macro and provide this path onto a cell say C4
3. The macro should open the first file in the folder copy all the contents from a sheet name "Information" and copy onto the file starting cell A5 and upon closing should close the individual file
4. Next it has to go to the next file and open it and start appending the data (if the previous book had 45 rows of data and it was filled from A5 to A50; then this has to be appended from A51) and so on.

I thank you all in advance for the effort that you will put in to help me out and I would be grateful to you for providing me the solution.

thanks and regards,
Subramanian V
 

Excel Facts

Shade all formula cells
To shade all formula cells: Home, Find & Select, Formulas to select all formulas. Then apply a light fill color.

Forum statistics

Threads
1,224,522
Messages
6,179,299
Members
452,904
Latest member
CodeMasterX

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