Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Double Dash
What does the double dash signify in a formula like this one I found in a
2006 post? =SUMPRODUCT(--(X2:X500="foo"),--(Y2:Y500<100)) I've seen it muliple times and haven't quite figured it out. Thanks. |
#2
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Double Dash
It converts a logical value (TRUE or FALSE) into a numerical value (1 or 0)
-- Gary''s Student - gsnu200860 "Erin Searfoss" wrote: What does the double dash signify in a formula like this one I found in a 2006 post? =SUMPRODUCT(--(X2:X500="foo"),--(Y2:Y500<100)) I've seen it muliple times and haven't quite figured it out. Thanks. |
#3
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Double Dash
J.E. McGimpsey has some notes at
http://mcgimpsey.com/excel/formulae/doubleneg.html If this post helps click Yes --------------- Jacob Skaria "Erin Searfoss" wrote: What does the double dash signify in a formula like this one I found in a 2006 post? =SUMPRODUCT(--(X2:X500="foo"),--(Y2:Y500<100)) I've seen it muliple times and haven't quite figured it out. Thanks. |
#4
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Double Dash
Perfect. Thanks.
"Gary''s Student" wrote: It converts a logical value (TRUE or FALSE) into a numerical value (1 or 0) -- Gary''s Student - gsnu200860 "Erin Searfoss" wrote: What does the double dash signify in a formula like this one I found in a 2006 post? =SUMPRODUCT(--(X2:X500="foo"),--(Y2:Y500<100)) I've seen it muliple times and haven't quite figured it out. Thanks. |
#5
Posted to microsoft.public.excel.worksheet.functions
|
|||
|
|||
Double Dash
"Erin Searfoss" wrote:
What does the double dash signify in a formula like this one I found in a 2006 post? =SUMPRODUCT(--(X2:X500="foo"),--(Y2:Y500<100)) Nothing special. It is simply an innocuous arithmetic operation (double negation) that leaves the numeric result unchanged. For example, --5 = -(-5) = 5. Some arithmetic operation is needed in order to treat the boolean result (TRUE or FALSE) as a number (1 or 0) because SUMPRODUCT requires the latter. But any valid arithmetic operation will have the same conversion effect. For example, the above formula can be rewritten without "--" as: =SUMPRODUCT((X2:X500="foo")*(Y2:Y500<100)) |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
double axis, double problem (i hope only to me) | Charts and Charting in Excel | |||
dash | Excel Worksheet Functions | |||
What does the double dash or "--" do when using it in a function? (and other questions) | Excel Worksheet Functions | |||
understanding dash dash in a excel formula | Excel Worksheet Functions | |||
double dash in formulas -- | Excel Discussion (Misc queries) |