按组计算的总数


Answers:


4

使用:

=IF(OR(AND(B2=0,B3<>0),AND(B2<>0,B3=0)),ROW(1:1)-SUM($D$1:$D1),"")

这将测试费用是从0变为0还是从0开始,然后它会获取行号并减去​​已经过帐的金额。

因此它只会发布差异。


4
好的解决方案 我注意到OR(AND(B2=0,B3<>0),AND(B2<>0,B3=0))可以进一步简化为XOR(B2=0,B3=0)。也就是整个公式可以简化为=IF(XOR(B2=0,B3=0),ROW(1:1)-SUM($D$1:$D1),"")
Kenneth L,
By using our site, you acknowledge that you have read and understand our Cookie Policy and Privacy Policy.
Licensed under cc by-sa 3.0 with attribution required.