SUMIF and NOT functions

%3CLINGO-SUB%20id%3D%22lingo-sub-2144215%22%20slang%3D%22en-US%22%3ESUMIF%20and%20NOT%20functions%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2144215%22%20slang%3D%22en-US%22%3E%3CP%3EHi%2C%3C%2FP%3E%3CP%3EJust%20trying%20to%20get%20my%20head%20around%20the%20best%20way%20to%20calculate%20the%20sum%20of%20values%20from%20one%20column%20but%20excluding%20some%20based%20off%20a%20name%20in%20another.%3C%2FP%3E%3CP%3EI%20tried%20the%20following%3A%3C%2FP%3E%3CP%3E%3DSUMIF(A4%3AA20%2CNOT(%22Bloggs%22)%2CB4%3AB20)%3C%2FP%3E%3CP%3EBut%20it%20just%20returns%20a%200%2C%3C%2FP%3E%3CP%3EI%3C%2FP%3E%3CP%3EAm%20i%20along%20the%20right%20lines%20or%20is%20their%20a%20different%20way%20to%20do%20this.%3C%2FP%3E%3CP%3EThanks.%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-LABS%20id%3D%22lingo-labs-2144215%22%20slang%3D%22en-US%22%3E%3CLINGO-LABEL%3EExcel%3C%2FLINGO-LABEL%3E%3C%2FLINGO-LABS%3E
New Contributor

Hi,

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:

=SUMIF(A4:A20,NOT("Bloggs"),B4:B20)

But it just returns a 0,

I

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

Thanks.

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

@JMB17 

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.