View Single Post
  #17   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Harlan Grove[_2_] Harlan Grove[_2_] is offline
external usenet poster
 
Posts: 1,231
Default Multiple "lookup_value"

"Sandy Mann" wrote...
....
So your argument is that because SUM() ignores text, all functions should
ignore text?


No. You're oversimplifying.

My argument is that ignoring text in conditional summing is as desirable as
ignoring text in nonconditional summing. That is, if

=SUM(Range)

produces a numeric result (and it always will unless there are error values
in some of the cells in Range), and since

=SUMIF(OtherRange,Criterion,Range)

would then also produce a numeric result NO MATTER WHAT'S IN OtherRange as
long as it's the same size/shape as Range, then consistency would make it
desirable for

=SUMPRODUCT((Condition1)*...*(ConditionN),Range)

also to produce a numeric result.

Perhaps if we are using it as a SUM() function, but here are we not in
fact using, (or misusing), it as a VLOOKUP() which does return errors at
times. So in that instance is it not more consistent to return errors
than to ignore them?

....

Ah, yes, this entire thread was originally about lookups. And if there were
nonnumeric text in some record that DIDN'T match the criteria but a number
in the record that DID match the criteria, what should the formula return?

But if there were text in the field sought for the record matching the
criteria, would it be better to return the text value or #VALUE! ?

But that all ignores the point Jim Cone brought up: SUMPRODUCT fails
miserably when there could be multiple records matching the criteria. For
lookup tasks, use lookup functions or MATCH.

Your use of SUMPRODUCT was ill-considered for lookup tasks, and it's
suboptimal/inconsistent for conditional summing.