Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9691

Value from last row based on criteria

$
0
0

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?


Viewing all articles
Browse latest Browse all 9691

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>