Take the 2-minute tour ×
Web Applications Stack Exchange is a question and answer site for power users of web applications. It's 100% free, no registration required.

Each cell in column A should report SUM of every cell of column B, except rows above those cells.

Sample:

| A | B |
---------
| 4 | 1 |
| 3 | 0 |
| 3 | 1 |
| 2 | 1 |
| 1 | 1 |
| 0 | 0 |

How can I achieve this using Google Spreadsheets?

share|improve this question

1 Answer 1

up vote 0 down vote accepted

This is almost the same as a cummulative sum, but reversed.

Formula

=SUM(B2:$B$7)  

or

=ARRAYFORMULA(SUMIF(ROW(A2:A7);">="&ROW(A2:A7);B2:B7))

Explained

If you add the first formula in C2, then you're able to copy that cell (drag) to C7. The ARRAYFORMULA will present the result at once.

Example

I've created an example file for you: Inverse Cummulative Sum

Reference

Cummulative Sum

share|improve this answer
1  
Thank you very much!!! –  user48096 Sep 21 '13 at 12:08

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.