I need to write an excel formula which will provide me with the column Sum given colums Cat(category) and Val(value). Based on the values in cat, values in val are separated in regions and sum is calculated for every region
Cat Val Sum
1 1
1 2
1 7
1 8 18
2 9
2 14
2 15
2 16 54
3 17
3 19
3 20
3 21 77
1 22
1 23
1 24
1 25
1 26 120