I'm trying to have a cell sum the maximum values in column C for each unique instance of A where B matches cell A1 on my sheet.
A | B | C |
---|---|---|
Pie | Apple | 3 |
Tart | Apple | 2 |
Pie | Cherry | 1 |
Pie | Apple | 5 |
Tart | Cherry | 4 |
Pie | Cherry | 4 |
Pie | Cherry | 6 |
So for this data above, when I have "Apple" in A1 on my sheet it would calculate 7 (based on 5+2) or when I have "Cherry" in A1 it would calculate 7 (based on 6+1).
I have tried QUERY but I'm thinking I need an arrayformula or vlookup combined with a query, but am struggling to identify the right method.
Can anyone point me down the right path?