View Single Post
  #12   Report Post  
Posted to microsoft.public.excel.programming
Tom Ogilvy Tom Ogilvy is offline
external usenet poster
 
Posts: 27,285
Default Excel - Double Negatives (Past, Present and Future)

for this specific usage, wouldn't

=SUMPRODUCT(-(A1:A100="A"),-(B1:B100="B"))

Achieve the same and be even "faster" than

=SUMPRODUCT(--(A1:A100="A"),--(B1:B100="B"))

Surprised Mr. Grove or Aladan haven't raised this issue - or have they?


--
Regards,
Tom Ogilvy

"Frank Kabel" wrote in message
...
Hi
one of the common usages is to convert boolean values into numbers
(TRUE = 1, FALSE = 0)
e.g. the formula
=--FALSE = 0
=--TRUE = 1

often used within the SUMPRODUCT function to coerce the boolean values:
=SUMPRODUCT(--(A1:A100="A"),--(B1:B100="B"))

Another usage is to convert numbers which are returned from string
function to real numbers.
e.g. the function
=LEFT("1ABS",1)
will return 1 as STRING. You can't use this return in calculations
Though the formula
=--LEFT("1ABS",1)
will return a value.

In this case it replaces the function VALUE(string)


--
Regards
Frank Kabel
Frankfurt, Germany


TKT-Tang wrote:
Am interested to search for exemplary formulae incorporating
minus-minus signs thereof. However, deploying search criterion such

as
"--" ain't gotten no good return from the archives. Please show the
ways to search in-situ.

Also, would like to request enlightenment on situations whereby

Double
Negatives would be aptly applied in formulae.

Regards.