Reputation: 1023
I want to excel to do the aggregation of data based on a reference column: the data I have in the excel is as below:
COL-A COL-B>
A 1
B 2
C 3
D 4
A 2
C 1
E 5
F 2
B 3
AND
I need the final values to be aggregated on COl-A as:
COL-A COLB
A 3
B 5
C 4
D 4
E 5
F 2
Could any please help how to acheive this in excel?
Upvotes: 0
Views: 1117
Reputation: 26611
I agree with Sandeep, the best dynamic solution is a Pivot Table.
Yet, if you wanted to use formula, you could use the SUMIF
formula.
For instance, put in cell C2
this kind of formula:
=SUMIF(Sheet1!A2:A10,A2,Sheet1!B2:B10)
Upvotes: 0
Reputation: 46
use a pivot table. Give column headers to both Column A (eg: alphabet) and Column B (eg: value). Select both the columns including header. Go to insert->pivot table. In the pivot table options, give row header as alphabet and 'value' in Values field.
Upvotes: 2