What does the double minus sign before a forkmula do? (e.g. "--SUM")

S

shadestreet

Just curious, sometime when I ask for help with a formula I am told t
use the "--", and I never really knew what it did.

Thank
 
N

Norman Harker

Hi Shadestreet!

It is used in many counting and summing formulas where a condition
returns TRUE or FALSE and we want to coerce the condition to either 1
or 0. The act of multiplying by -- is the same as multiplying twice
by -1.

Here's a simple example:

=AND(C3=31,C10=28)
Returns TRUE or FALSE

But:

=--AND(C3=31,C10=28)
Returns 1 or 0.
 
Top