Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
What is the "--" (double dash) in MS Excel formula?
I would like to know the meaning of "--" (double dash) in the below Excel formula:
========= start of formula ================= =SUM(OFFSET(Source!$C$4:$C$425,,,MATCH(0,--(MMULT(--(ROW(OFFSET($A$1,,,ROWS(Source!$C$4:$C$425)))=COL UMN(OFFSET($A$1,,,,ROWS(Source!$C$4:$C$425))))-0.5*(ROW(OFFSET($A$1,,,ROWS(Source!$C$4:$C$425)))= COLUMN(OFFSET($A$1,,,,ROWS(Source!$C$4:$C$425)))), OFFSET(Source!$C$4:$C$425,,,ROWS(Source!$C$4:$C$42 5))+0)SUM(Source!$C$4:$C$425)*ROWS($C$4:$C5)/4))))-SUM(OFFSET(Source!$C$4:$C$425,,,MATCH(0,--(MMULT(--(ROW(OFFSET($A$1,,,ROWS(Source!$C$4:$C$425)))=COL UMN(OFFSET($A$1,,,,ROWS(Source!$C$4:$C$425))))-0.5*(ROW(OFFSET($A$1,,,ROWS(Source!$C$4:$C$425)))= COLUMN(OFFSET($A$1,,,,ROWS(Source!$C$4:$C$425)))), OFFSET(Source!$C$4:$C$425,,,ROWS(Source!$C$4:$C$42 5))+0)SUM(Source!$C$4:$C$425)*ROWS($C$4:$C4)/4)))) ========= end of formula ================= Thanks. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
What is the "--" (double dash) in MS Excel formula?
"Alfred" wrote:
I would like to know the meaning of "--" (double dash) in the below Excel formula: [....] MATCH(0,--(MMULT(--(ROW(OFFSET(.... MATCH(0,--(MMULT(--(ROW(OFFSET(.... It is simply double-negation. As you might know, -5 is negative 5. --5 is negative negative 5, which is simply 5. Normally, double-negation is needed to convert non-numeric values to numeric values. Any idempotent arithmetic operation will work; for example, multiplying by 1 instead of using double-negation. (But I prefer double-negation.) I have not completely parsed the formula that you provided. But my guess is, the double-negative is used in the following context: --(something=something) In that context, we are converting the (array of?) logical value(s) TRUE and FALSE to 1 and 0, which might be needed for the MATCH expression to work properly. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
What is the "--" (double dash) in MS Excel formula?
On Sun, 4 Aug 2013 15:34:35 -0700, joeu2004 wrote:
Normally, double-negation is needed to convert non-numeric values to numeric values. Any idempotent arithmetic operation will work; for example, multiplying by 1 instead of using double-negation. (But I prefer double-negation.) Out of curiosity, why? How is that superior to multiplying by 1 or adding 0? -- Stan Brown, Oak Road Systems, Tompkins County, New York, USA http://OakRoadSystems.com Shikata ga nai... |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Replace "dash" with "space" | Excel Discussion (Misc queries) | |||
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell | Excel Discussion (Misc queries) | |||
"formula is too long" AND test for whether double-quotes are next-to text or number?? | Excel Discussion (Misc queries) | |||
What does the double dash or "--" do when using it in a function? (and other questions) | Excel Worksheet Functions | |||
If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ... | Excel Programming |