Shweta
Well-known Member
- Joined
- Jun 5, 2011
- Messages
- 514
Hi All,
I need a macro that can open all the filesfrom a path provided in a cell in excel work book and copy thecontents 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.
The situation is this. I have multiple files stored in D:\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.
Thanks,
Shweta
I need a macro that can open all the filesfrom a path provided in a cell in excel work book and copy thecontents 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.
The situation is this. I have multiple files stored in D:\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.
Thanks,
Shweta
Last edited: