(I'm using Excel 2010 (32 bit) on Windows 7.)
I have several workbooks which I have set up sets of like worksheets between "separator" tabs so I can sum across worksheets and perform other functions across the worksheets. The arrangement of worksheets (tabs) is something like this: StartTab, WorkTab1, WorkTab2, ..., WorkTabn,EndTab. The thing is that the various workbooks I use have different number of "WorkTabs" in between the "separator' tabs (StartTab and EndTab). I need to write a macro that includes grouping all the tabs in between the "separator" tabs. Unfortunately everything I've seen does this through a statement like:
Sheets(Array("StartTab","WorkTab1","WorkTab2","EndTab")).Select
Since the the number of "WorkTabs" is different in all my workbooks, and the worksheet names vary, I can't use this appraoch. Is there a way to write a VBA statement that will group all the worksheets in between my two "separator" tabs.
Thanks in advance.
I have several workbooks which I have set up sets of like worksheets between "separator" tabs so I can sum across worksheets and perform other functions across the worksheets. The arrangement of worksheets (tabs) is something like this: StartTab, WorkTab1, WorkTab2, ..., WorkTabn,EndTab. The thing is that the various workbooks I use have different number of "WorkTabs" in between the "separator' tabs (StartTab and EndTab). I need to write a macro that includes grouping all the tabs in between the "separator" tabs. Unfortunately everything I've seen does this through a statement like:
Sheets(Array("StartTab","WorkTab1","WorkTab2","EndTab")).Select
Since the the number of "WorkTabs" is different in all my workbooks, and the worksheet names vary, I can't use this appraoch. Is there a way to write a VBA statement that will group all the worksheets in between my two "separator" tabs.
Thanks in advance.