excel数列中有负数和正数,要分别求和,该怎么办?

2024-11-07 16:39:42
推荐回答(2个)
回答1:

设数据在A列,
在B1输入:=SUMIF(A:A,"<0"),可得负数和
B2输入:=SUMIF(A:A,">0"),可得正数和

回答2:

=SUMPRODUCT((A1:A10>=0)*(A1:A10))

=SUMPRODUCT((A1:A10<0)*(A1:A10))