the proper use of sumif

  • Thread starter Thread starter Lamb Chop
  • Start date Start date
L

Lamb Chop

How can I sum B1:B33 if A1:A33 is in between 50 and 70 ?

I have tried this, but I only got 0

=SUMIF(A1:A33, "AND(>50, <70)", B1:B33)



Thanks
 
=SUMIF(A1:A33,">50")-SUMIF(A1:A33,">70")

this will include 70, use >= if you want to exclude it.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
Do you mean SUMIF can only have simple, ">", "<" and "=" comparison and all
the AND and OR functions won't work in SUMIF?

Thanks
 
Indeed I do.

You can use the technique I showed for simple conditions, or you can use

=SUMPRODUCT(--(A1:A33>50),--(A1:A33<=70),A1:A33)

which can be extended to much more complex formulae.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads

Summing a range that changes 6
Please help: Filter numbers 3
Filter numbers 3
Get numbers from row 11
please help! 1
Sumif less than x 3
Sumif Horizontal 6
sum multiple columns with SUMIF or SUMPRODUCT 2

Back
Top