Meaning of "--" in formulas

J

JoAnn

I sometimes see formulas with -- before a set of parenthesis (sample formula
below), can anyone tell me what the purpose of it is? I can't seem to find
it documented anywhere.

For example:
=SUMPRODUCT(--(MONTH(b7:b400)=MONTH(D417)), --(YEAR(b7:b400)=YEAR(D417))

Thanks
 
C

Cimjet

Hi JoAnn

The -- stuff changes trues and falses
to 1's and 0's. Logic expression to numeric expression.
Regards
Cimjet
 
M

Michael M

Hi JoAnn
Further to Cimjets answer.
The -- is called a Double Unary and the simple way to see Cimjets answer is
to take them out of the formula and see the result in the formula bar.
It will refer to True or false rather than a mathematical result

Regards
Michael M
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top