Macro to open workbook from a specified location in consolidate data

ragav_in

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

I have an urgent requirement for a macro that can open all the files
from a path provided in a cell in excel work book and copy the
contents from Columns A to K (consolidated data) in the new workbook.
Kindly provide me the code to perform this operation, so that I can
modify it according to my needs. Currently my MS Office is not
working as expected and hence asking this help from you in the hope
that I will get an solution to my problem. Thanks in advance for
those who spend time in getting the code for me.

The situation is this. I will have multiple files stored in C:\MyData
\Sep2011\. I need to have one file (New one with the macro in it),
wherein I have to open this workbook and provide the path in a cell
say C2. Once I provide this path and click the execute macro, I need
the macro to open all the individual workbooks in the path (all
workbooks will be of same format) and copy columns A to K and start
pasting in this new workbook. When the macro goes to the next work
book and opens it, it has to append the data in the next row where the
earlier workbook's data has ended. For e.g. if Workbook A has 50 rows
of data and the macro has copied data frmo R5 to R55, when it opens
the second workbook, it should add the first row from the second
workbook to R56. likewise it has to open all the workbooks,
consolidate the data and put it in. THis is my requirement. i
request you to build the code for this functionality and send me the
code such that i can use it to consolidate 1000s of indiidual files
into one single file.

I understand this is a very urgent request and my MS Office has
stopped working (crashing very often) and hence would be grateful to
you all if this gets accomplished. Thanks in advance to those who
spend their valuable time in looking at this thread and trying out the
macro for me. Request you to not consider this as a Duplicate Post,
becos I have tried to provide the requirements elaborately as possible
here.

Thanks a milllion once again in advance from,
Subramanian V
 

Excel Facts

Control Word Wrap
Press Alt+Enter to move to a new row in a cell. Lets you control where the words wrap.

Forum statistics

Threads
1,224,587
Messages
6,179,740
Members
452,940
Latest member
rootytrip

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