# Why is SUMIF working "selectively" (i.e., not working sometimes)?

SUMIF is letting me down "selectively" and I'm not sure why (or I am letting SUMIF down, not sure which).

This one with original sample data.

And this one with a smaller made up set.

I am using the exact same formula in each:

``````=SUMIF(B2:B,"rdc",C2:C)
``````

On one sheet it works, on the other, well, not so much.

If you are after any cell which has ONLY "rdc" (without the quotes), then your formula is fine. If you want any cell which has rdc anyplace in the string, then change it to:

``````=SUMIF(B2:B,"*rdc*",C2:C)
``````

If rdc should stand alone, and not be in the mniddle of a word, then

``````=SUMIF(B2:B,"* rdc *",C2:C)
``````

For cells starting with rdc:

``````=SUMIF(B2:B,"rdc*",C2:C)
``````

Basically, you need to add a wildcard. Then there is the question of what about upper case letters? These are not case sensitive.

• Thanks Karl! I wasn't aware of this feature. I'm all lower case, but what would you recommend for fielding mixed case? Feb 8 '17 at 16:14
• I would use a =sum(query()) combination something link: `=sum(query(B2:C, "select C where B contains 'rdc",0'))` I believe this may return a case sensitive result. Feb 8 '17 at 16:25