Home > Software design >  Calculating sum and repeated values from current and previous cells
Calculating sum and repeated values from current and previous cells

Time:09-27

Is there any Excel formula to sum the value from the current cell to the previous cell, while the previous cell's value is added all along the table? To clarify my question, here is a sample data table with illustration on the calculation in column B:

Sample data

CodePudding user response:

In B2, formula copied down :

=SUMPRODUCT((COUNT(A$2:A2)-ROW(INDIRECT("1:"&COUNT(A$2:A2))) 1)*A$2:A2)

enter image description here

  • Related