I have some data in a pivot table and I am trying to figure out how to sum each number over 40 in a pivot table column, but only the amount over 40:
我在数据透视表中有一些数据,我试图弄清楚如何在数据透视表列中将每个数字加起来超过40,但只有超过40的数量:
40
41
42
39
38
The above should yield 3 because there are two numbers over 40 (41, 42), and total amount over 40 is 3.
上面应该得到3,因为有两个数字超过40(41,42),超过40的总数是3。
I have not been able to figure out how to do it formulaically, so I am resigned to VBA if necessary.
我无法弄清楚如何以公式方式做到这一点,所以如果有必要我会辞职到VBA。
Any help is appreciated!
任何帮助表示赞赏!
1 个解决方案
#1
0
Use SUMPRODUCT()
使用SUMPRODUCT()
=SUMPRODUCT((A1:A5>40)*(A1:A5-40))
Where A1:A5
is the range of the column in your pivot table.
其中A1:A5是数据透视表中列的范围。
#1
0
Use SUMPRODUCT()
使用SUMPRODUCT()
=SUMPRODUCT((A1:A5>40)*(A1:A5-40))
Where A1:A5
is the range of the column in your pivot table.
其中A1:A5是数据透视表中列的范围。