SUMIF and NOT functions

New Contributor


Just trying to get my head around the best way to calculate the sum of values from one column but excluding some based off a name in another.

I tried the following:


But it just returns a 0,


Am i along the right lines or is their a different way to do this.


4 Replies
Try =SUMIF(A4:A20,"<>Bloggs",B4:B20)


Great thanks that works,

I'm guessing <> basically means "not equal to"?

Correct. When you enter SUMIF(A4:A20,"Bloggs",B4:B20), the "=" is implicit, so think of it as SUMIF(A4:A20,"=Bloggs",B4:B20), but you can use other conditional comparison operators (<, >, <=, >=, <>).

Yeh makes sense, thanks for the explanation.