Zend certified PHP/Magento developer

Is there a way with Excel Formulas to Sum up a column with the values above the referenced column?

For example say I have this data set:

A B C
1 0 0
2 2 0
3 2 1

What I want to do is put a formula into column C that sums all of the values from Column A if they are in the current row or above, from the sum of the values in Colum B that are in the current row or above.

So if the formula was run on row 2 the sum of Column A would be 2 and the sum of Column B would be 0 making the value of Column C 2.

Or if the formula was run on row 3 Columns A’s sum would be 4, Column B’s sum would be 1, so Column C’s Value would be 3.

Is this something Formulas can even do?