sum( ) columns with labels

Copper Contributor

I have an attendance sheet with dates across the column tops and members down the rows. 

There are groups of members that need to be summed as a group and added to the grand total. 

I'd like to use labels so that when members are added or removed and the group sums move, the labels allow the grand total to be correct. 

 

Enter a "1" the member is present.

I have it working for one column (below). 

If I extend the label to all columns (GroupA=$B$6:$b$J), it sums up all columns and rows.

 

How can I make it sum all group columns individually and sum all group sums (by label) to a grand total? 

 

I think it would work if I gave each column sum a name, but I'd rather have the column sum one name, 

 

 

MCBinder_0-1653289115202.png

MCBinder_2-1653289213180.png

 

1 Reply

@MCBinder 

I'd define the groups in the sheet itself:

S1455.png

Click anywhere in the data, then click Subtotal on the Data tab of the ribbon.

Specify that you want a subtotal on each change in Group, and that you want subtotals for each of the columns labeled 1, 2, ...:

S1456.png

Click OK. You get group subtotals and grand totals, and outline buttons to expand/collapse the data.

S1457.png