Hi all
I am in process of creating a template that can be used for business plan modelling and one of the things i hoped to add is a VBA macro that can group / ungroup certain columns upon pressing a button.
The file will have multiple tabs but only some will need to be grouped (and these will always be in same format) whilst others wouldn't be (in workbook labelled "Other Stuff").
The criteria for grouping would be if the column is showing Actual data or Forecast. In the attached workbook (light blue tabs) this can be seen in row 7 & 8 so in this instance columns F-Z would need to be grouped.
In the attached workbook i've added an Overview tab where i've created the 2 buttons (as i believe this would be easier to write for) as well as listed the workbook tabs. I've added criteria on whether they should be grouped or not - for testing purposes. Ideally as the workbook grows i could just adjust the macro to incorporate the new additional tabs/sheets.
I've never written macros myself and all the google searching ive done has produced code that has gone way over my head / is limited to instances for single tabs so any help would be greatly appreciated.
I tried doing basic version by simply recording the action but whilst this would group the columns it wouldnt "hide detail" despite doing that whilst recording. plus it wouldnt be dynamic based on changing column requirements unless changed manually in VBA each time.
Many thanks for any responses / suggestions!
Bookmarks