我一直在尝试找出一种公式,该公式可根据另一列中的id值来计算一列中行的累积总和,但仍然没有找到解决方案。我尝试通过这些示例来说明我的意思:
ID Value CumulativeCounter
1 2 (ID1 has 2)
2 3 (ID2 has 3)
3 1 (ID3 has 1)
4 5 (ID4 has 5)
1 9 (ID1 has the previous value 2 and this new 9 on top of that =11)
2 1 (ID2 has the previous value 3 and this new 1 on top of that =4)
依此类推,这是另一个示例(在“ Excel视图”中),其中包含更多的条目和数字:
A B C
1 1 2 2
2 2 7 7
3 3 3 3
4 1 2 4 (<- 2+2)
5 5 9 9
6 1 2 6 (<- 4+2)
7 4 3 3
8 2 7 14
9 1 8 14 (<- 6+8)
我将永远为此提供一个公式解决方案,不胜感激!
您需要将sumif与正确设置的引用一起使用,将其输入C1并填写:=SUMIF($A$1:A1,A1,$B$1:B1)
。
本文收集自互联网,转载请注明来源。
如有侵权,请联系[email protected] 删除。
我来说两句