1

I've got the following data:

Google Sheets data

And beneath the last visible cell on column C, I want to sum up all values in the cells, but only if their corresponding value on column B (the "Taxed" checkbox) is set to false.

I tried this formula:

=SUM(INDEX(QUERY(B2:C11, "WHERE B = FALSE" , 1), , 2))

But it doesn't work well. It gives me $169.30, but it should be $115.23.

Is there any way I could fix my formula, or do I need to use something else?

1

You can use a much simpler SUMIF formula:

=SUMIF(B2:B11,FALSE,C2:C11)

Please read about the SUMIF function.

| improve this answer | |
  • Please remember that as per site guidelines when an answer addresses your question, accept it and even upvote it so others can benefit as well. – marikamitsos Apr 22 at 23:38
  • Thanks so much, @marikamitsos! I was away, otherwise I would've accepted the answer faster :) – Paul Razvan Berg Apr 23 at 0:14
  • Thank you for taking the time to accept. :) – marikamitsos Apr 24 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.