View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Conditional SUM Q

The form

=SUMPRODUCT(--(A7:E7A5:E5),(A7:E7-A5:E5))

is the form in which the SUMPRODUCT function multiplies two arrays
together (the result of --(A7:E7A5:E5) and t he result of
(A7:E7-A5:E5)) and adds the resulting array - see

http://www.mcgimpsey.com/excel/doubleneg.html

The form

=SUMPRODUCT((A5:E5<A7:E7)*(A7:E7-A5:E5))

first multiplies the arrays, then passes the result off to the
SUMPRODUCT function, which adds the values in the array.

Practically, there's not very much difference, though testing found that
the first form was marginally faster. You probably won't notice a
difference on a modern machine until you start having large numbers of
SUMPRODUCT functions with large arrays.




In article . com,
Sean wrote:

One question, what is the difference with the way the following is
expressed?

=SUMPRODUCT((A5:E5<A7:E7)*(A7:E7-A5:E5))

and

=SUMPRODUCT(--(A7:E7A5:E5),(A7:E7-A5:E5))