![]() |
the proper use of sumif
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 |
the proper use of sumif
=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) "Lamb Chop" wrote in message ... 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 |
the proper use of sumif
Do you mean SUMIF can only have simple, "", "<" and "=" comparison and all
the AND and OR functions won't work in SUMIF? Thanks "Bob Phillips" wrote in message ... =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) "Lamb Chop" wrote in message ... 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 |
the proper use of sumif
Indeed I do.
You can use the technique I showed for simple conditions, or you can use =SUMPRODUCT(--(A1:A3350),--(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) "Lamb Chop" wrote in message ... Do you mean SUMIF can only have simple, "", "<" and "=" comparison and all the AND and OR functions won't work in SUMIF? Thanks "Bob Phillips" wrote in message ... =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) "Lamb Chop" wrote in message ... 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 |
All times are GMT +1. The time now is 10:09 PM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com