I’m trying to write the VBA for totaling by group.
What I want to do
For each Column Sum the total and Depending upon the number of Groups Sumif the total for the group
This is what I have so far
[codebox]
Sub CreateTotals()
Dim TotalRow As Range
TotalRow = Cells(“B5:B” & Cells(Rows.Count, 2).End(xlDown).Row + 1
Cells(TotalRow, 2).Value = “Totals”
Cells(TotalRow, 2).Resize(1, 7).FormulaR1C1 = “=Round(Sum(R5C:R[-1]C),2)”[/codebox]