Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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
Posted to microsoft.public.excel.newusers
|
|||
|
|||
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 |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
What is the meaning of the plus sign in "=+A1"? | Excel Worksheet Functions | |||
What is the meaning of the plus sign in "=+A1"? | Excel Worksheet Functions | |||
Combine logical formulas "if", "and", "or" | Excel Discussion (Misc queries) | |||
Combining formulas, "and" & "or" to verify content of multiple cel | Excel Discussion (Misc queries) | |||
In Excel, what is the meaning of " ^ " symbol in a formula? | Excel Discussion (Misc queries) |