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 Answer 1

2

You can use a much simpler SUMIF formula:

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

Please read about the SUMIF function.

3
  • 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. Apr 22, 2020 at 23:38
  • Thanks so much, @marikamitsos! I was away, otherwise I would've accepted the answer faster :) Apr 23, 2020 at 0:14
  • Thank you for taking the time to accept. :) Apr 24, 2020 at 18:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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