Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2008

Tip: Looking for answers? Try searching our database.

Meaning of "--" in formulas

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
JoAnn - 25 Mar 2008 17:49 GMT
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
Signature

JoAnn

Cimjet - 25 Mar 2008 17:59 GMT
Hi JoAnn

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

>I sometimes see formulas with -- before a set of parenthesis (sample
>formula
[quoted text clipped - 6 lines]
>
> Thanks
JoAnn - 25 Mar 2008 18:17 GMT
Great! Thanks.
Signature

JoAnn

> Hi JoAnn
>
[quoted text clipped - 13 lines]
> >
> > Thanks
Michael M - 25 Mar 2008 23:31 GMT
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

> Great! Thanks.
>
[quoted text clipped - 15 lines]
> > >
> > > Thanks

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.