Reputation: 33
How can I sum the rows of product sales 1-3, until the Customer Code changes? Then the next Customer sales should be summed up. There may be customers with only 1 or 2 products also.
Upvotes: 0
Views: 590
Reputation: 17555
This is exactly the reason why the subtotals feature has been invented. Hereby a screenshot (not in English, sorry):
Here is the URL of the official documentation.
Upvotes: 3
Reputation: 383
If you have CustomerId in column A and Sales in column B, you could add an extra column C with formula:
=IF(A2=A1,C1+B2,B2)
And then drag it down.
Upvotes: 3