Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sum column only of rows that match a condition (of another column)

I have a spreadsheet in Google with the following data:

**Status         Amount**
Under Review    $120.00
Delivered       $50.00
Paid            $320.00
Paid            $110.00
Under Review    $200.00

I want to sum all the column Amount, only but of only of those rows that has a Status on 'Delivered' or 'Paid'

With my example, the SUM should return $480.00.

I was trying with this formula, but it isn't working

=SUMIF(Column Amount,Status={"Delivered","Paid"},Column Amount)

Any ideas? Thanks a lot!

like image 279
Jorge GVD Avatar asked Oct 22 '25 04:10

Jorge GVD


1 Answers

You can also use the following formula:

=SUM(QUERY(A2:B,"select sum(B) where A='Paid' or A='Delivered' group by A"))

enter image description here

like image 156
marikamitsos Avatar answered Oct 27 '25 04:10

marikamitsos



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!