SUMPRODUCT to calculate commissions

  • Thread starter Thread starter Hans Knudsen
  • Start date Start date
H

Hans Knudsen

Hello
McGimpsey has a fine article on the above (thanks!)
http://www.mcgimpsey.com/excel/taxvariablerate.html

=SUMPRODUCT(--(A1>{........

He states: *.... The double unary-minus (-) operators are the fastest way to do the coercion.*

It may be a lack in my elementary education but it is not quite obvious to me what he is saying here. Can someone sheed some light?

Hans Knudsen
 
Hans,

By coercion, he means converting a Boolean value (TRUE or FALSE)
to its numeric equivalent (1 or 0). There are variety of ways,
such as adding 0 or multiplying by 1. The fastest and most
efficient way is to use two negation operators. Together, they
change the sign twice, resulting in a numeric value.


--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC
www.cpearson.com


Hans Knudsen said:
Hello
McGimpsey has a fine article on the above (thanks!)
http://www.mcgimpsey.com/excel/taxvariablerate.html

=SUMPRODUCT(--(A1>{........

He states: *.... The double unary-minus (-) operators are the
fastest way to do the coercion.*
It may be a lack in my elementary education but it is not quite
obvious to me what he is saying here. Can someone sheed some
light?
 
Thanks Chip.
(By mistake I happened to send a similar message to your private address)

Regards
Hans
 
Back
Top