Sum If

C

carl

I need to sum COLB if COLA = BOX549 or BOX980

BOX549 70601
BOX919 60254
BOX017 45468
BOX980 24232

Thank you in advance.
 
B

bpeltzer

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
 
K

Ken Wright

=SUMPRODUCT((A1:A1000={"BOX980","BOX549"})*B1:B1000)

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

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

Bob Phillips

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

--
HTH

Bob Phillips

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

carl

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

Thanks again.
 
B

Bob Phillips

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)
 
Top