Quantcast
Channel: Hot Weekly Questions - Web Applications Stack Exchange
Viewing all articles
Browse latest Browse all 9782

How can I get sub-sums of a column based on another columns unique values?

$
0
0

I have a sheet with the following setup

A       B      CItemID, Type,  Count0001,   Apple, 80002,   Peach, 30003,   Apple, 80004,   Pear,  20005,   Apple, 4

And I would like to produce the following sheet

D      EType,  TotalApple, 20Peach, 3Pear,  2

I can generate the unique Type with UNIQUE and generate the first column of the desired output, but I can't quite figure how to get the second.

I have tried SUMIF(C1:C6, B1:B6==D1:D6) but it seems the == does not do an element-wise matching.


How can I get sub-sums of a column based on another columns unique values?


Viewing all articles
Browse latest Browse all 9782

Trending Articles