SUMIF with Exception of multiple Item

S

Scorpvin

The basic formula for the exception of one item would look like this
=SUMIF(A2:A6,"<>Red",B2:B6). How can I add except red and blue?
 
G

Guest

You could do it with three SUMs: one to total all cells, one for the red,
one for the blues:
=SUM(B2:B6)-SUMIF(A2:A6,"<>Red",B2:B6)-SUMIF(A2:A6,"<>Blue",B2:B6)

Andy.
 
B

Bob Phillips

=SUMPRODUCT(--(NOT(ISNA(MATCH(A2:A6,{"Red","Blue"})))),B2:B6)

--
HTH

Bob Phillips

(remove nothere from email address if mailing direct)
 
Top