如何使用Excel表结构化引用创建运行总计? [英] How to create running total using Excel table structured references?
问题描述
我正在寻找一种使用Excel表结构化引用来创建一个运行总计(总计当前行或以上)的方式。
I'm looking for a way to create a running total (total of the current row and above) using Excel table structured references.
我知道如何做它使用旧的行/列方式:
= SUM($ A $ 2:$ A2)
I know how to do it using the old row/column based way:
=SUM($A$2:$A2)
我知道如何使用结构化引用来整个列:
= SUM([WTaskUnits])
And I know how to total an entire column using structured references:
=SUM([WTaskUnits])
我知道如何使用 [#ThisRow]
获取当前单元格,但我不知道如何获取第一行
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
.
推荐答案
其实,我只是想出了使用INDEX做的一种方法,但是觉得应该有一个更结构化的参考方式。不过,对于其他人来说,这是我想出来的:
= SUM(INDEX([WTaskUnits],1):[[#行],[WTaskUnits ]])
Actually, I did just figure out one way of doing it using INDEX, but feel like there should be a more structured reference way. Still, for others looking to do this here is what I came up with:
=SUM(INDEX([WTaskUnits],1):[[#This Row],[WTaskUnits]])
我使用INDEX获取列的第一个单元格(相当于我的行/列示例中$ A $ 2)和通常使用[#This Row]获取当前行中的单元格(相当于我的行/列示例中的A2)。
I use INDEX to get the first cell of the column (equivalent of $A$2 in my row/column example) and use [#This Row] normally to get the cell in current row (equivalent of A2 in my row/column example).
这篇关于如何使用Excel表结构化引用创建运行总计?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!