Google Sheets – Summing Cells Based on Value in Another Column

google sheets

enter image description hereI'm trying to sum all data in column E, where the row has a particular value in column D (in this instance '-2').

I have tried the below formula with no joy.

=SUM(FILTER(E2:E2203,D2:D2203="-2"))

I've attached a screenshot for reference.

Can anyone help me?

Best Answer

Your data in Column D appears to be numeric in type. However, your formula is instructing FILTER to look for a string type, since you've enclosed the -2 in quotation marks. Try simply removing the quotation marks from before and after -2, after which FILTER will start looking for the true numeric value of negative two.