Sum Product with Four Conditions

J

JimS

I tried this formula but I get the N/A error:

=SUMPRODUCT(($E$15:$E$2005="d")*($F$15:$F$2005="s")*($G$15:$G$2005>0)*(N15:N2505>0))

I changed it to the following, but I get the Value# error:

=IF(N15:N2005>0,SUMPRODUCT(($E$15:$E$2005="d")*($F$15:$F$2005="s")*($G$15:$G$2005>0)))

How do you do a four condition sumproduct?

Thanks
 
S

ShaneDevenshire

Hi,

The first thing I would recommend is changing to

=SUMPRODUCT(--($E$15:$E$2005="d"),--($F$15:$F$2005="s"),--($G$15:$G$2005>0),--(N15:N2505>0))

I also note that the cell address for the last entry is not the same as the
prior ones - 2505 verses 2005.

If this helps, please click the Yes button
 
J

JimS

Changing all of the cell references to 2505 solved the problem. I
also took note of your change to my formula.

Thank you.
 
R

RagDyeR

In addition to Bob's site, which many consider the "bible" of the *users*
evolution of SumProduct,
as opposed to Redmond's original intention for the function,
here's my 2¢ from an old post of mine:

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<

The determining factor as to what form to use should be by how the
calculating data range(s) are to be populated.

The main difference between the unary form and the asterisk form is that
when using the asterisk, *all* the data in the calculating range(s) *must*
be numeric.
That numeric data can even be numeric text - just as long as it looks like a
number, the asterisk form will calculate it.
If it's not in any numeric form, it will return an error.


The unary form will simply by-pass any text or non-numeric data, and
complete the calculation using only *real XL recognized* numbers.


Therefore, if you're populating your calculating ranges with formulas that
may return nulls ( "" ), or text messages (such as "No Data Present"), then
the unary form is the *only* way to go.


However, if data is to be either keyed in, or imported, the asterisk form
*should* be the form of choice, since it will calculate the various forms of
numbers that are usually imported from other apps or the web.
Imported numeric text will by-passed with the unary form, without any
indication as to what data was or was not used in the calculation, which may
produce inaccurate returns.


Another difference between the two forms, is that the asterisk form *must*
be used when *uneven* range sizes are incorporated in calculating 2
dimensional (row v. column) formulas.


With all things being equal, the unary form is supposedly the faster to
calculate, making it the choice for very large ranges.

<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top