How to create running total using Excel table stru

2019-03-23 12:07发布

I'm looking for a way to create a running total (total of the current row and above) using Excel table structured references.

I know how to do it using the old row/column based way:
=SUM($A$2:$A2)

And I know how to total an entire column using structured references:
=SUM([WTaskUnits])

And I know how to get the current cell using [#ThisRow], but I'm not sure how to get the first row of the table to use it in a SUM.

8条回答
我只想做你的唯一
2楼-- · 2019-03-23 12:41

I created my running total using Excel's Pivot:

  • Sum values -> Sum of ...
  • Show values as -> Running total

My 2 cents, 5 years late (and maybe missing the point).

查看更多
仙女界的扛把子
3楼-- · 2019-03-23 12:42

I realize this is an old thread, but I finally have a solution I would like to offer.

=IF(ISNUMBER(OFFSET([@Balance],-1,0)),OFFSET([@Balance],-1,0)+[@Amount],[@Amount])

In the instance of the first data row, the offset points to the header, which is not a number, therefore the result is only the Amount column.

The remaining rows give you the previous Balance from the OFFSET plus the current row Amount.

查看更多
登录 后发表回答