In Google Sheets, I am looking for a formula to use one column as a diff and another as sum. BUT it should ignore rows where the diff is empty.
Example case:
| A | B | C |
| --- | --- | --- |
1 | John | 10 | 50 |
2 | Peter | 20 | 70 |
3 | John | | |
4 | Peter | 12 | 82 |
5 | John | 5 | 55 |
C4 is the total of Peters last sum (from C2) plus the diff (B4)
C5 is the total of Johns last sum (which is from C1, and not from Johns last row (3) which had no diff (B3)) plus the diff (B5).
So, what is a good formula for the C-column, that will result in the described values in C4/C5?
row()
with others. But if there isn't some easy sequence, it would be bit complicated.