ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Sum If (https://www.excelbanter.com/excel-worksheet-functions/104893-sum-if.html)

Carl

Sum If
 
I need to sum COLB if COLA = BOX549 or BOX980

BOX549 70601
BOX919 60254
BOX017 45468
BOX980 24232

Thank you in advance.



bpeltzer

Sum If
 
Since the two conditions are mutually exclusive, you can just add the results
of each:
=sumif(a:a,"BOX549",b:b)+sumif(a:a,"BOX980",b:b)
--Bruce

"carl" wrote:

I need to sum COLB if COLA = BOX549 or BOX980

BOX549 70601
BOX919 60254
BOX017 45468
BOX980 24232

Thank you in advance.



Ken Wright

Sum If
 
=SUMPRODUCT((A1:A1000={"BOX980","BOX549"})*B1:B100 0)

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

------------------------------*------------------------------*----------------
It's easier to beg forgiveness than ask permission :-)
------------------------------*------------------------------*----------------


"carl" wrote in message
...
I need to sum COLB if COLA = BOX549 or BOX980

BOX549 70601
BOX919 60254
BOX017 45468
BOX980 24232

Thank you in advance.





Bob Phillips

Sum If
 
=SUMPRODUCT(--(A1:A100=("BOX549","BOX890"}),B1:B100)

--
HTH

Bob Phillips

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

"carl" wrote in message
...
I need to sum COLB if COLA = BOX549 or BOX980

BOX549 70601
BOX919 60254
BOX017 45468
BOX980 24232

Thank you in advance.





Carl

Sum If
 
Hi. I typed in =SUMPRODUCT(--(A1:A100={"BOX549","BOX890"}),B1:B100) and get
#N/A. Any ideas ?

Thanks again.

"Bob Phillips" wrote:

=SUMPRODUCT(--(A1:A100=("BOX549","BOX890"}),B1:B100)

--
HTH

Bob Phillips

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

"carl" wrote in message
...
I need to sum COLB if COLA = BOX549 or BOX980

BOX549 70601
BOX919 60254
BOX017 45468
BOX980 24232

Thank you in advance.






Bob Phillips

Sum If
 
My bad, this condition type needs a * operator

=SUMPRODUCT((A1:A100={"BOX549","BOX890"})*(B1:B100 ))

--
HTH

Bob Phillips

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

"carl" wrote in message
...
Hi. I typed in =SUMPRODUCT(--(A1:A100={"BOX549","BOX890"}),B1:B100) and

get
#N/A. Any ideas ?

Thanks again.

"Bob Phillips" wrote:

=SUMPRODUCT(--(A1:A100=("BOX549","BOX890"}),B1:B100)

--
HTH

Bob Phillips

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

"carl" wrote in message
...
I need to sum COLB if COLA = BOX549 or BOX980

BOX549 70601
BOX919 60254
BOX017 45468
BOX980 24232

Thank you in advance.









All times are GMT +1. The time now is 05:03 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com