Quantcast
Channel: Excel Help Forum - Excel Programming / VBA / Macros
Viewing all articles
Browse latest Browse all 50061

Column Grouping Levels

$
0
0
Hi,

I have a spreadsheet, where I'm adding grouping like this:
Code:

Range(Columns(1), Columns(7)).Group
I need two levels of grouping. In my example, I'm grouping by weeks, then by months. So I want all the weeks grouping to fall in one level with all the months in another level.

My coding does other things as well, so the most efficient way for it to run is to start with the earliest date, then every time it hits the end of a week it groups, and everytime it hits the end of a month, it adds that grouping.

Will this work as I intend if I do all the week grouping first, then loop back through to do the month grouping? Or preferrably, is there a way to set the grouping level?

I'm on Excel 2007.

Viewing all articles
Browse latest Browse all 50061

Trending Articles