LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 905
Default SUMPRODUCT(ARRAY) RETURNING "VALUE#"

"Amethyst" wrote:
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 -----

"Amethyst" wrote:

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?
--
Amethyst

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
isna vlookup returning"0" instead of " " Martha Excel Worksheet Functions 3 April 20th 07 09:31 PM
"Type mismatch" when I try to fill an Array variable with "+" [email protected] Excel Discussion (Misc queries) 1 April 17th 07 01:28 PM
How do I use "offset" function in "array formula"? hongguang Excel Discussion (Misc queries) 3 April 4th 07 12:04 AM
Returning a distance from a tabel, given "from" and "To"? Max Excel Worksheet Functions 4 June 21st 06 11:52 AM


All times are GMT +1. The time now is 10:29 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"