Google-sheets – How to find a string then find the sum of all cells next to the found string

formulasgoogle sheetsgoogle-sheets-query

So I'm trying to get G4 to automatically find "Bananas" in all of C and for every time it finds a value it adds up the corresponding number in D.

Best Answer

=QUERY(C4:D, "select C,sum(D) where C <>'' group by C label sum(D)''")

0


=SUMIF(C$4:C, F4, D$4:D)

0