I'm trying to work out the follow. I need to write a formula that sums ups the amounts in a column, however these amounts are grouped, the last one in a group should not be taken into account as this is the sum of the group. The other way around could also work, by just summing up the sums of each of the grouped amounts.

A
15.00
5.00
20.00

179.00
179.00

178.00
178.00

Sum Should be 20+179+178 or 15+5+179+178.

Anyone has a best approach for this?