Sumproduct returns value error when ref is formula
The asterisk form of Sumproduct() will return a #VALUE! error if *ANY* cell
in the referenced total column (Column D) is *not* a number.
This includes nulls ( "" ).
So, if your formulas look something like this:
=IF(B2*C2=0,"",B2*C2)
You will get that #VALUE! error.
Try these formulas, and see what happens:
=SUMIF(A2:A100,"jan",D2:D100)
=SUMPRODUCT(--(A2:A100="Jan"),D2:D100)
--
HTH,
RD
---------------------------------------------------------------------------
Please keep all correspondence within the NewsGroup, so all may benefit !
---------------------------------------------------------------------------
"wx4usa" wrote in message
ups.com...
I am using sumproduct to build a report.
The referenced column has a formula in it. Sumproduct returns a value
error message since there is a formula in the referenced cells.
Example:
Column A Month (entered)
Column B Sales (entered)
Column C Profit Percent (entered)
Column D Profit dollars (results given by formula, column B * column
C)
Here is the problem
=sumproduct((column a=January)*(column d)) This returns Value error
because column D is a formula. If i enter the column D numbers it
calculates fine
=sumproduct((column a =January)*(columnb)) Works fine because column B
is entered and not a formula
Help??
|