Hi,
I am wanting to make a macro to use Excel's "group" feature/tool as found in Data > Group but via a macro, examples of the function that I am wanting to use:
The objective of the macro would be to "group" each dataset in my sheet without the title row and also any marked/defined columns.
I want to define columns based on a string such as:
For the first one in the list "Title 4" that one is a column on it's own which is easy to do.
The hard part is when it gets to the column titled "E 8" it needs to detect that this column is marked to be grouped, check the columns to the right until a column is no longer being "matched" in the GROUPCOLUMNS variable and hide them as a single group, but then when it cycles to the next column titled "E 4" it should skip this one as it's already been "grouped"
As for grouping of the datasets, it's all of the "data" rows except for the titles in each area
In my attached document, you can see the easy visual view of how it would group them by comparing Sheet 1 and Sheet 2
I'd prefer to stick with this sort of structure macro as someone else made as it's nice and easy to understand for me.
I'd greatly appreciate some advice.
Bookmarks