What does -- mean?

R

Ron

I have been seeing "--" in formulae but cannot find an explanation of what
it is or does.

Example: =SUMPRODUCT(--(MONTH(B2:B13)=1), C2:C13)


--

Ron P

Sometimes you're the windshield:)
Sometimes you're the bug:(
 
K

Ken Wright

As Peo pointed out in another post:-

For January you need to add another condition

=SUMPRODUCT(--(MONTH(A1:A100)=1),--(ISNUMBER(A1:A100)))

it's because that excel sees blank cells as zero and excel dates dtart with
January zero 1900 the unary minuses will convert boolean values of true and
false to 1 and 0

http://www.mcgimpsey.com/excel/formulae/doubleneg.html
 
R

Ron

Ken Wright said:
As Peo pointed out in another post:-

For January you need to add another condition

=SUMPRODUCT(--(MONTH(A1:A100)=1),--(ISNUMBER(A1:A100)))

it's because that excel sees blank cells as zero and excel dates dtart
with
January zero 1900 the unary minuses will convert boolean values of true
and
false to 1 and 0

http://www.mcgimpsey.com/excel/formulae/doubleneg.html

Thank you very much. I hadn't come across this before. It makes sense.
Thanks

Ron
 

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