#1   Report Post  
Ron
 
Posts: n/a
Default What does -- mean?

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:(



  #2   Report Post  
Bob Phillips
 
Posts: n/a
Default

See

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
Multiple Condition Tests

for a full explanation.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ron" wrote in message
...
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:(





  #3   Report Post  
Ken Wright
 
Posts: n/a
Default

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

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------

"Ron" wrote in message
...
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:(





  #4   Report Post  
Ron
 
Posts: n/a
Default

"Bob Phillips" wrote in message
...
See

http://www.xldynamic.com/source/xld.SUMPRODUCT.html
Multiple Condition Tests

for a full explanation.

--

HTH

RP
(remove nothere from the email address if mailing direct)


"Ron" wrote in message
...
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)


Thank you very much. It now makes sense.
Ron

  #5   Report Post  
Ron
 
Posts: n/a
Default

"Ken Wright" wrote in message
...
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

--
Regards
Ken....................... Microsoft MVP - Excel
Sys Spec - Win XP Pro / XL 97/00/02/03

----------------------------------------------------------------------------
It's easier to beg forgiveness than ask permission :-)
----------------------------------------------------------------------------


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

Ron

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT +1. The time now is 02:04 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"