Consolidating Workbooks
Posted by Katie on December 08, 2001 7:24 AM
Here is my scenario: I have 3 workbooks with 15 sheets each. I want to take one sheet at a time (without hardcoding their names), one from each workbook to create 15 workbooks with 3 sheets each.
The macro I wish to write would do the following:
1. open the three workbooks (I know how to write this)
2. format each sheet in all workbooks the exact same way and delete hidden columns. (I have the code to format & delete columns, I just need to know where to place it in all of this)
3. move first sheet from workbook1 to new workbook & rename as MTH
4. move first sheet from workbook2 to behind the MTH sheet in workbook from step #3& rename as QTD
5. move first sheet from workbook3 to behind the QTD sheet in workbook in steps 3&4 & rename as YTD
6. prompt for path and filename to save as (since each time through the loop, the path & file name will be different.
7. Close new workbook
8. Next
NOTES: All three sheets to be moved are named the same thing in each original workbook so I can't move all three at one time and must rename the sheet before moving the next.
I know this is a lot. I'll take it in piecemeal if you've got it. Thanks :-) Katie