2013-10-22 66 views
0

我想要總和excel表的行的值等於一些隨機值。 例如:如何總結其值等於隨機變量的行在excel 2010

A  B 
12 3 
12 5 
10 6 
13 7 
13 2 
13 2 
... 

比如我要總結,其a相等所有B。即總和所有B的A是12,然後是10等等。使用函數sumif()我不能動態地傳遞A的值..是否有任何人有一個想法

+1

你可以使用數據透視表這一點。 –

+0

sumif中使用的確切表達式是什麼? (感興趣的是你的「不能動態傳遞A的值」) – Thomas

+0

謝謝你的回答,但實際上主要的問題是範圍也是隨機的 – eskoba

回答

0

嘗試這兩個之一選項:

Use a sumif with the range like this: 

To get the sum use formula 
=SUMIF(A5:A10,B1,B5:B10) 

Here A5:A10 is criteria range. B1 is variable criteria cell, and B5:B10 is sum range. 


Use a sumif with a table. 
=SUMIF(Table2[A],B1,Table2[B]) 
Here Table2[A](Tablename[Columnname]) is criteria range, B1 is variable criteria cell, and Table2[B] is column used for sum. 

Find an example in this excel document.

+0

謝謝你的工作 – eskoba

+0

歡迎,它是我的榮幸:) –