SumProduct Formula Error

J

Josh O.

I am using the following formula:
=SUMPRODUCT(($A2:$A3702>847300000)*($A2:$A3702<847399999)*($G2:$G3702>0)*($G2:$G3702<31),$D2:$D3702)

Because the cells in the columns use a formula that sometimes returns a #N/A
result, the result of the above formula is always #N/A. Is there a way to
alter the formula so that is only adds the numbers and returns the sum of the
D column for all the cells that meet the enclosed criteria?
 
P

Peo Sjoblom

You would be better off if you fixed the #N/A like

=IF(ISNA(formula),"",formula)


regardless in what column do they (N/A) appear? If they are in one
particular column you could just use
the IF for that particular column, otherwise you could use something like

=SUM((IF(ISNUMBER($A2:$A37),$A2:$A37>847300000))*(IF(ISNUMBER($A2:$A37),$A2:
$A37<847399999))*(IF(ISNUMBER($G2:$G37),$G2:$G37>0))*($D2:$D37))

entered with ctrl + shift & enter
--

Regards,

Peo Sjoblom
 
J

Josh O.

Okay, is there a way to fix a #VALUE!? In the same cell? The formulas in
the cell range can return "#N/A" if a customer number is found but not an
invoice number, and "#VALUE!" if the customer number is not found.

I tried the formula you have below (with the correct cell ranges), but I am
getting a #VALUE! error. Is that because there are #VALUE! errors in the
cell ranges?
 
P

Peo Sjoblom

Assuming the values error come from the column D

=SUM((IF(ISNUMBER($A2:$A3702),$A2:$A3702>847300000))*(IF(ISNUMBER($A2:$A3702
),$A2:$A37<847399999))*(IF(ISNUMBER($G2:$G3702),$G2:$G3702>0))*(IF(ISNUMBER(
$D2:$D3702),$D2:$D3702)))

also array entered

value errors come from calculated text, (for exam;e =1+"a") you should be
able to fix that as well, that way you could use
your original formula


--

Regards,

Peo Sjoblom
 
J

Josh O.

How do fix the value error? It comes from a vlookup formula for customers
that are not on a particular report.
 
P

Peo Sjoblom

I don't think vlookup can retrun a value erro unless you make a calculation
with the result or if
there are value errors in the lookup table itself. If you are making a
calculation like n*vlookup
and vlookup sometimes returns a "" or a text?

=IF(ISTEXT(vlookup),0,vlookup)

or if the vlookup gives the error

=IF(ISERROR(vlookup),0,vlookup)

something like that
 

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