Here is an in depth discussion of it in addition to what's already been
said. I think there is a web page that discusses it too, but can't find it.
http://tinyurl.com/57htb
One thing to add about "--" is that it can be used to convert text numbers
from text to numbers within a formula, not just convert true/false values to
1s and 0s.
For example if you have:
BG3435
GF3564
MH5669
and want to count the number of these entries with 3 as the 3rd character,
you could use:
=SUMPRODUCT(--(--MID(A1:A3,3,1)=3))
to get the correct result of 2.
=SUMPRODUCT(--(MID(A1:A3,3,1)=3))
will return a 0 since the text functions (e.g., MID, LEFT, RIGHT) return
text and not numbers. To be comprehensive, you could change =3 to ="3" and
it would count as well. Though, if you were obtaining the 3 from the =3 part
from a calculation, then you would have to use extra functions to represent
it as text (had you not used the -- before MID), which is why using --
before MID is desirable in this instance.
Similarly, you can use -- before a range in formulas, such as:
=SUMPRODUCT(--(--A1:A100=5))
to count the number of times '5' is the value of the cells in A1:A100. If
you are dealing with data that may not (100% of the time) be formatted as
numbers, you may want to use that to convert even text values of "5" to the
number 5 to be counted with this formula.