( by Zack18 )
I'm performing a "SUMIF" using multiple criteria, so to do this I've created an "IFERROR
Have a look at the following screenshot:
=sum(iferror(query(B3:E;"select C where B='"& L31 &"' and ( not E contains 'M' and not E contains 'D') ")))
As you have mentioned in your question:
"I want to filter out all cells in a given range that don't contain an "M" or a "D" in the text."
So I have included not in my query.
You can manipulate the above formula by changing the 'and' to 'or' and removing 'not' as per your requirement.
the above formula takes 'M' as case sensitive, so if you also wish to include search for 'm' and 'd' then add more condition in the query.
NOTE: the above formula will work if you have non-numeric value in Cell L31 and if you have numeric value then try the following formula:
=sum(iferror(query(B3:E;"select C where B="& L31 &" and ( not E contains 'M' and not E contains 'D') ")))
I hope the above solution will help you, and if you need more help then please do comment below on this blog itself, I will try to help you out.