I have a template file which will be sent out to all subsidiaries of my company.
- The template has a tab named start and one named end.
- The subsidiaries will place a variable number of template submission sheets between these two names sheets and send them in to me to consolidate into one sheet in my consolidation file.
- I have written macros to copy each sheet into the consolidation file, but I currently need to run it sheet by sheet as I don’t know how to loop.
- The copy macro sits in my Personal.xls file and the paste macro sits in the consolidation sheet.
- The loop macro would need to work between the Source file (could be any name) and the consolidation file which is called Consolidation.xls.
- Once all sheets are copied from a source file, I then open the next source file and start again, so macro would need to forget the old source file and remember the new one.
This could literally save me hours each week if I could get a macro to work, so any help much appreciated.
I think this is along the lines of what you are chasing. If all your templates are in a single folder, and each have a “start” and “end” sheet then this code will collate them into either
I have updated my code from “Collating worksheets from one or more workbooks into a summary file”, http://www.experts-exchange.com/A_2804.html to cater for your “start” and “end” sheets
Please post if you need (or have) further detail