I have seen formulas that include two -'s. I am not sure what this does. Is
it just a way to add some spacing since two negatives equal a positive?
Example:
=SUMPRODUCT(--(A1:A100=1),--(B1:B100<>""))
Well, -A1 simply means "negative of A1"; so if A1 is 2, -A1 is -2. "--
A1" means "negative of negative of A1", which does not change the
value of A1; for example --2 is 2.
The question should be: why is that needed in the formula above?
The answer is: in order to treat the boolean results as integers.
For example, (A1:A100=1) results in the value TRUE or FALSE. Those
are encoded as 1 and 0 respectively. But they are not recognized as
integers unless they are used in arithmetic expression such as "--
expression".
The "--" could have been avoided by coding the formula as follows,
with the same effect:
=SUMPRODUCT((A1:A100=1)*(B1:B100<>""))