Trying to decipher some Excel formulas and I see some stuff like SUMPRODUCT(--Left(...)...)
What is the -- doing? Naturally seems like decrementing to me but couldn\
The unary operator (-) is a shorthand method to convert a true/false statement into -1/0.
A single operator will convert -(true) into -1, so a double unary operator is used to convert that back into 1:
-(-(true)) = -(-(1)) = 1 -(-(false)) = -(-(0)) = 0