View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Paul B
 
Posts: n/a
Default What is the -- in formulas?

Sheri, here is an answer from a previous post on the subject form Chip
Pearson

One uses the double negation operators -- to change a boolean
value of TRUE or FALSE to its numeric equivalent of 1 or 0. The
first - changes TRUE to -1 and FALSE to 0, and the second change
the -1 to +1 and the 0 to 0. The sign is always preserved because
the negative of a negative is the same number.


The -- is the same as multiplying what follows by -1 twice. It
is used to change comparisons which return TRUE or FALSE to their
numeric equivalents of 1 and 0.
--
Cordially,
Chip Pearson
Microsoft MVP - Excel
Pearson Software Consulting, LLC


--
Paul B
Always backup your data before trying something new
Please post any response to the newsgroups so others can benefit from it
Feedback on answers is always appreciated!
Using Excel 2002 & 2003

"SheriTingle" wrote in message
...
Hello and thanks for the help. I have seen -- in formulas and I have no

idea
what that means or why the use of a double negative sign. Could someone
please explain to me when this is used and why?

Here's an example of a formula I saw using the --


=SUMPRODUCT(--($A$2:$A$30<""),--(TEXT($A$2:$A$30,"dddd")=$C2),--($B$2:$B$30
))

THANKS!