Google Sheets – Sum Column with Boolean Secondary Column

google docsgoogle sheets

With this kind of Google Docs Spreadsheet:

enter image description here

How can I calculate SUM(C1:C8), but without values where the corresponding D column has a 0 (so, without C1 and C3)?

Best Answer

Try the following formula:

=SUMIF(D1:D8, "<>0", C1:C8)

Not described in the help is the use of <>. This reads as not equal

The rest is explained in the help: