Input:
I have the following data;
C | D | |
---|---|---|
1 | $1 | ABC |
2 | $2 | ABC |
3 | $3 | DEF |
4 | $4 | ABC |
I want to create another table in the same sheet where I want to add the values in Column C
based on the keys in Column D
.
Output:
G | H | |
---|---|---|
1 | ABC | $7 |
2 | DEF | $3 |
Here $7 is the sum of values corresponding to ABC and $3 is the sum of values corresponding to DEF.
So I need something like "= Sum of values in Column C corresponding to Key in G1 found in Column D"
in H1 and so on...
What's the best way to achieve this instead of adding the values manually?
Thank you for your help.