I have a whole heap of worksheets in a workbook with names like 1_1, 1_2, 1_3... 1_n, 2_1, 2_2, 2_3, 2_n....,3_1, 3_2,3_3, 3_n....
I need to merge all the worksheets where the number before the underscore is the same.
So, 1_1, 1_2, 1_3, 1_n will all be in the same worksheet Group1
2_1, 2_2, 2_3...2_n will be in the worksheet Group2
Each Group contains a variable number of sheets.
I have tried looping like this, but it does not find any worksheets that meet the criteria and therefore does not copy anything.
Where z = number of groups ( will be either user input or found in a cell reference)
I have attached a sample workbook.
Any assistance appreciated.
Bookmarks