Excel公式帮助 - 符合特定条件的总和数

时间:2016-03-31 14:40:11

标签: excel formula

我想添加具有相同UID的所有%LU * AEI号码(参见屏幕截图)。我考虑使用IF公式,但我的UID范围从W1-W200,所以公式会很麻烦。

我也不知道如何将这些数字加在一起以获得每个UID一个数字。我的想法一直偏向于基于对象的东西,因为我经常使用Python和R,但我认为没有办法将数字汇集到Excel中的对象中。

有没有人对如何开始接近这个有任何暗示?

我尝试了=SUMIF(C2:C3, A3=A2)=SUMIF(C2:C3,A3=A2, C3:C2)这两个都无效。

enter image description here

1 个答案:

答案 0 :(得分:0)

In a new sheet, in column A stick:

W1
W2
W3
W...

Down to W200 then in B1 of that new sheet:

=SUMIF(Sheet1!$A:$A,A1, Sheet1!$C:$C)

And copy that down. You could also do it all in one formula, where in a new sheet you put in A1:

=SUMIF(Sheet1!$A:$A, "W" & ROW() , Sheet1!$C:$C)

And copy that down. That will just make a W1, W2 value based on the row that the formula is in and then do the SUMIF() based on that value.