Solved

# Using Multiple Values in Criteria in Excel

Posted on 2013-12-18
237 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 500 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

## Join & Write a Comment Already a member? Login.

The new Microsoft OS looks great, is easier than ever to upgrade to, it is even free.  So what's the catch?  If you don't change the privacy settings, Microsoft will, in accordance with the (EULA) you clicked okay to without reading, collect all the…
Entering a date in Microsoft Access can be tricky. A typo can cause month and day to be shuffled, entering the day only causes an error, as does entering, say, day 31 in June. This article shows how an inputmask supported by code can help the user a…
The viewer will learn how to create two correlated normally distributed random variables in Excel, use a normal distribution to simulate the return on different levels of investment in each of the two funds over a period of ten years, and, create a …