Sunday, May 8, 2011

yogi_Sum Values In A Column For A Group Matching Numbers In Another Column

Google Spreadsheet
nomedeusuario said:
I have a situation where I want to have a sumif, where my "condition" is a group and not one variable.
For instance:
Group A:
1
2
3
Activities
A1: 1 B1: 10
A2: 4 B2: 5
A3: 3 B3: 5
A4: 2 B4: 4
A5:5 B5: 5
A6: 1 B6: 1
A7:6 B7: 2
Target:
To build a Sum Group A function that will return in this case 10 + 5 + 4 + 1
Is that possible to achieve that with the Query function ? how ?

--------------------------------------------------------------------------------
In the following I have solutions using the SUMIF function, the FILTER function, and the QUERY function