Sumif if range does not equal any text in a range

Luigi802

Board Regular
Joined
Oct 16, 2014
Messages
80
I have an expense report, and I want to sum the amount that does not equal a range of text, i.e.

Description Amount Category
misc.item $20.32 Gas
misc.item $10.20 Food
misc.item $5.68 Snacks
misc.item $40.00 Gas
misc.item $6.48 Food
misc.item $32.78 Gas
misc.item $4.32 Vending
misc.item $100.32 Food
misc.item $4.50 Lunch
misc.item $42.50 Gas
misc.item $23.50 Gift

How do I sum everything that IS NOT gas or food?
Also I will probably add a lot of other misc. things so =sumifs(B2:B12,C1:C12,"<>Gas",C1:C12,"<>Food") won't work for me cause I'd have to add another criteria every time something new is added
 

Excel Facts

Bring active cell back into view
Start at A1 and select to A9999 while writing a formula, you can't see A1 anymore. Press Ctrl+Backspace to bring active cell into view.
If you want to designate another range to contain Gas and Food, say E2:E3
=SUM(B2:B12)-SUMPRODUCT(SUMIF(C2:C12,$E$2:$E$3,B2:B12))
 
Upvote 0
If you want to designate another range to contain Gas and Food, say E2:E3
=SUM(B2:B12)-SUMPRODUCT(SUMIF(C2:C12,$E$2:$E$3,B2:B12))

Well gas and food are in a table a table, which will be constantly modified, if I add anything to that table I also want it to avoid summing the new item
Basically I have 2 tables, 1 with items I want to avoid, the other has all my expenses with their amounts, I want to sum everything in my expense report that is not equal to the text in the "gas/food" table.....does that make sense?
 
Last edited:
Upvote 0
Yep, should work just fine.
In the example formula I posted, E2:E3 is the first table with the items to avoid, C2:C12 and B2:B12 is the 2nd table with all the expenses and amounts
 
Upvote 0
Yep, should work just fine.
In the example formula I posted, E2:E3 is the first table with the items to avoid, C2:C12 and B2:B12 is the 2nd table with all the expenses and amounts

OK, I'll give it a try when I get out of my meeting lol
 
Upvote 0
Yep, should work just fine.
In the example formula I posted, E2:E3 is the first table with the items to avoid, C2:C12 and B2:B12 is the 2nd table with all the expenses and amounts

AWESOME! That worked!, So simple why didn't think of it lol
 
Upvote 0

Forum statistics

Threads
1,216,168
Messages
6,129,268
Members
449,497
Latest member
The Wamp

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top