Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 78
Default Meaning of "--" in formulas

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
--
JoAnn
  #2   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 95
Default Meaning of "--" in formulas

Hi JoAnn

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

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


  #3   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 78
Default Meaning of "--" in formulas

Great! Thanks.
--
JoAnn


"Cimjet" wrote:

Hi JoAnn

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

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



  #4   Report Post  
Posted to microsoft.public.excel.newusers
external usenet poster
 
Posts: 118
Default Meaning of "--" in formulas

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

"JoAnn" wrote:

Great! Thanks.
--
JoAnn


"Cimjet" wrote:

Hi JoAnn

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

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



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


Similar Threads
Thread Thread Starter Forum Replies Last Post
What is the meaning of the plus sign in "=+A1"? qinyg Excel Worksheet Functions 1 August 17th 07 06:24 PM
What is the meaning of the plus sign in "=+A1"? Elkar Excel Worksheet Functions 0 August 17th 07 02:06 AM
Combine logical formulas "if", "and", "or" pscu Excel Discussion (Misc queries) 5 November 2nd 06 07:43 PM
Combining formulas, "and" & "or" to verify content of multiple cel Shu of AZ Excel Discussion (Misc queries) 15 October 15th 06 11:22 PM
In Excel, what is the meaning of " ^ " symbol in a formula? Anthony Excel Discussion (Misc queries) 2 October 6th 06 01:09 AM


All times are GMT +1. The time now is 06:09 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"