Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 1
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 829
Default 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   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 524
Default 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
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
Replace "dash" with "space" Turkey Excel Discussion (Misc queries) 2 April 30th 09 11:31 PM
Excel - Golf - how to display "-2" as "2 Under" or "4"as "+4" or "4 Over" in a calculation cell Steve Kay Excel Discussion (Misc queries) 2 August 8th 08 01:54 AM
"formula is too long" AND test for whether double-quotes are next-to text or number?? The Moose Excel Discussion (Misc queries) 2 September 14th 06 05:29 AM
What does the double dash or "--" do when using it in a function? (and other questions) CanoAko Excel Worksheet Functions 5 August 9th 06 07:21 PM
If changed array formula reduce ""\""\""\ - signs to #Missing, will it make ... Maria J-son[_2_] Excel Programming 2 March 5th 06 12:20 PM


All times are GMT +1. The time now is 01:50 AM.

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"