x
Solved

Using Multiple Values in Criteria in Excel

Posted on 2013-12-18
Medium Priority
268 Views
This is what I am trying to do and I will add my broken formulas as well.

=SUMIF(B5:B154, {"A";"B","S1"}, H5:H154)
=SUMIF(B5:B154, CRITDN, H5:H154)

So here is what I want it to do.

If Value in B5 = A or B or S1 Then Use H5 Value in SUM total.

If Value of B6 = S Then Then do not Use H6 Value in SUM total.

I Also have a Defined Name of CRITDN that has each match in a cell. and the Value of the Defined Name is {"A";"B";"S1"}
0
Question by:_BTS_

LVL 23

Accepted Solution

NBVC earned 2000 total points
ID: 39727304
Try:

=SUMPRODUCT(SUMIF(B5:B154, {"A";"B";"S1"}, H5:H154))

or

=SUMPRODUCT(SUMIF(B5:B154, CRITDN, H5:H154))
0

Author Comment

ID: 39727457
That was the trick!  I was pulling my hair out!!!!
0

Featured Post

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.