SUMPRODUCT(ARRAY) RETURNING "VALUE#"

A

Amethyst

I'm using
=SUMPRODUCT(--('sheetname'!$c$2:$c$100="SAname"),--('sheetname'!$h$2:$h$100))
to find an SA in Col C and add up his roll call in Col H. The formula worked
in the original worksheet, but when additional lines were added to
'sheetname', the formula is returning #VALUE!. The formula looks OK. What
went wrong?
 
J

Jim Thomlinson

Try this...

=SUMPRODUCT(('sheetname'!$c$2:$c$100="SAname")*('sheetname'!$h$2:$h$100))
 
J

Joe User

Amethyst said:
I'm using
=SUMPRODUCT(--('sheetname'!$c$2:$c$100="SAname"),
--('sheetname'!$h$2:$h$100)) [....]
the formula is returning #VALUE!.

Try:

=SUMPRODUCT(--('sheetname'!$c$2:$c$100="SAname"),
'sheetname'!$h$2:$h$100)

The root cause of the problem is probably non-numeric values in H2:H100,
e.g. null strings ("").

Most non-numeric values [1] cause #VALUE errors in arithmetic expression
such as --('sheetname'!$h$2:$h$100) and
('sheetname'!$c$2:$c$100="SAname")*('sheetname'!$h$2:$h$100)).

But SUMPRODUCT treats non-numeric values in array arguments as zero.

PS: Alternatively, you can use:

=SUMIF('sheetname'!$c$2:$c$100, "SAname",
'sheetname'!$h$2:$h$100)


-----
Endnotes:

[1] Text that look likes a number is treated as a number in arithmetic
expressions. Presumably that does not apply in this case since, then, you
would not see a #VALUE error.


----- original message -----
 

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

Similar Threads

Reverse Unique Values 1
Array Constant 3
League Table follow up 2
Wildcard not working in SumProduct Array 8
Sumproduct - Return value as Blank 3
#div/0! Error 3
Excel Sumproduct 7
Sumproduct or Sumif formula 5

Top