Google-sheets – How to use a checkbox to choose to add the value or not in total

google sheets

I would like to create a budget based on categories of items. I would like to be able to add the items into category types so I can see what I spend of "Food" for example. I am trying to use the checkbox to not have the item in the row's cost added to the total. Screen shot below is for the total of the items in that category, but I want to say

=SUMIF($B$3:$B$100, $G2&A2<>true,$D$3:$D$100)

… but this isn't correct.

enter image description here

What I mean is with the check boxes checked, I want to ignore the first 2 "Travel Expenses" so they are not totaled. I want H2 to have a value of "$60.69", which is the total of 16.05 + 4 + 40.64

Best Answer

You can use the following formula:

=SUMIFS($D$3:$D$100,$A$3:$A$100,FALSE,$B$3:$B$100,$G$2:$G$8)

You can further drag the formula down to calculate values for the rest fo your categories.

Functions used: