Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

My sheet looks like this:

1|A      | B
2|amount | source
3|173.00 | bank1
4|173.00 | cc
5|173.00 | cash
6|173.00 | bank2
7|173.00 | cc

This is simplified but what I want to do is Sumif A3:A7 if B3:B7 does not contain cash or cc. Sumif needs to either include or exclude 2 criterion.

My working solution is


Just wanted to know if anyone knew a way to exclude/include more than one criteria in a straight-forward way?

share|improve this question
up vote 6 down vote accepted

Try this:


This is a way for you to apply two different evaluations of cell contents (cc and cash) to the same range of numbers.

share|improve this answer
Yep! Work perfectly. Thanks! – getthemike Nov 29 '12 at 20:07
This is such a powerful formula. Opens up a whole new world of possibilities... Helped me solve a problem that took me about 1 hour. Thanks! :) – Leniel Macaferi Jan 10 '13 at 20:48

This is also a possible solution for this specific question:


but the first answer is more flexible.

share|improve this answer
Best to use the simplest solution when possible! Spreadsheet formulas can get out of hand really quickly, especially array formulas. – andrewb Oct 25 '14 at 1:20

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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