#1   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 29
Default Double hyphens --

What does a double hyphen do in a formual?
e.g. =SUMPRODUCT(--(Sheet2!$A$2:$A$100=$A2),--(Sheet2!$H$2:$H$100="H98"))

I saw that as a response in a different post, and I've seen the "--" in
other responses but have not been successful in finding it in help
  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 35,218
Default Double hyphens --

=sumproduct() likes to work with numbers. The -- stuff changes trues and falses
to 1's and 0's.

Bob Phillips explains =sumproduct() in much more detail he
http://www.xldynamic.com/source/xld.SUMPRODUCT.html

And J.E. McGimpsey has some notes at:
http://mcgimpsey.com/excel/formulae/doubleneg.html

SteveM wrote:

What does a double hyphen do in a formual?
e.g. =SUMPRODUCT(--(Sheet2!$A$2:$A$100=$A2),--(Sheet2!$H$2:$H$100="H98"))

I saw that as a response in a different post, and I've seen the "--" in
other responses but have not been successful in finding it in help


--

Dave Peterson
  #3   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Double hyphens --

It's double unary. It, in this case, forces a TRUE or FALSE argument into a
numerical value of 1 or 0. If you do a search for double unary, you might
find some better explanations, but essentially, it takes a text argument and
converts it (if able) into a numeric argument.
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"SteveM" wrote:

What does a double hyphen do in a formual?
e.g. =SUMPRODUCT(--(Sheet2!$A$2:$A$100=$A2),--(Sheet2!$H$2:$H$100="H98"))

I saw that as a response in a different post, and I've seen the "--" in
other responses but have not been successful in finding it in help

  #4   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Double hyphens --

Please, John, it is double unary NEGATION. The operators - and + can both be
used in a unary form (ie operating on only one argument) So we can have =+A1
and =-A1 (just because the first one does nothing does not alter the logic)
Sorry to be nit-picking!
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"John C" <johnc@stateofdenial wrote in message
...
It's double unary. It, in this case, forces a TRUE or FALSE argument into
a
numerical value of 1 or 0. If you do a search for double unary, you might
find some better explanations, but essentially, it takes a text argument
and
converts it (if able) into a numeric argument.
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"SteveM" wrote:

What does a double hyphen do in a formual?
e.g. =SUMPRODUCT(--(Sheet2!$A$2:$A$100=$A2),--(Sheet2!$H$2:$H$100="H98"))

I saw that as a response in a different post, and I've seen the "--" in
other responses but have not been successful in finding it in help



  #5   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Double hyphens --

Okay, so, apprently you completely disregardded my statement of
.... If you do a search for double unary, you might find some better
explanations ...
??? Sorry to be nitpicky, but I qualified my response already.
--
** John C **

"Bernard Liengme" wrote:

Please, John, it is double unary NEGATION. The operators - and + can both be
used in a unary form (ie operating on only one argument) So we can have =+A1
and =-A1 (just because the first one does nothing does not alter the logic)
Sorry to be nit-picking!
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"John C" <johnc@stateofdenial wrote in message
...
It's double unary. It, in this case, forces a TRUE or FALSE argument into
a
numerical value of 1 or 0. If you do a search for double unary, you might
find some better explanations, but essentially, it takes a text argument
and
converts it (if able) into a numeric argument.
--
** John C **
Please remember if your question is answered, to mark it answered :). It
helps everyone.


"SteveM" wrote:

What does a double hyphen do in a formual?
e.g. =SUMPRODUCT(--(Sheet2!$A$2:$A$100=$A2),--(Sheet2!$H$2:$H$100="H98"))

I saw that as a response in a different post, and I've seen the "--" in
other responses but have not been successful in finding it in help






  #6   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 4,393
Default Double hyphens --

PEACE
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"John C" <johnc@stateofdenial wrote in message
...
Okay, so, apprently you completely disregardded my statement of
... If you do a search for double unary, you might find some better
explanations ...
??? Sorry to be nitpicky, but I qualified my response already.
--
** John C **

"Bernard Liengme" wrote:

Please, John, it is double unary NEGATION. The operators - and + can both
be
used in a unary form (ie operating on only one argument) So we can have
=+A1
and =-A1 (just because the first one does nothing does not alter the
logic)
Sorry to be nit-picking!
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"John C" <johnc@stateofdenial wrote in message
...
It's double unary. It, in this case, forces a TRUE or FALSE argument
into
a
numerical value of 1 or 0. If you do a search for double unary, you
might
find some better explanations, but essentially, it takes a text
argument
and
converts it (if able) into a numeric argument.
--
** John C **
Please remember if your question is answered, to mark it answered :).
It
helps everyone.


"SteveM" wrote:

What does a double hyphen do in a formual?
e.g.
=SUMPRODUCT(--(Sheet2!$A$2:$A$100=$A2),--(Sheet2!$H$2:$H$100="H98"))

I saw that as a response in a different post, and I've seen the "--"
in
other responses but have not been successful in finding it in help






  #7   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,358
Default Double hyphens --

*sigh*, now I am sad, you missed my joke. The fact is, if I have to exlpain
it, it's isn't that funny. Was wondering if you'd catch my typos in my
response to you.
--
** John C **

"Bernard Liengme" wrote:

PEACE
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"John C" <johnc@stateofdenial wrote in message
...
Okay, so, apprently you completely disregardded my statement of
... If you do a search for double unary, you might find some better
explanations ...
??? Sorry to be nitpicky, but I qualified my response already.
--
** John C **

"Bernard Liengme" wrote:

Please, John, it is double unary NEGATION. The operators - and + can both
be
used in a unary form (ie operating on only one argument) So we can have
=+A1
and =-A1 (just because the first one does nothing does not alter the
logic)
Sorry to be nit-picking!
--
Bernard V Liengme
Microsoft Excel MVP
http://people.stfx.ca/bliengme
remove caps from email

"John C" <johnc@stateofdenial wrote in message
...
It's double unary. It, in this case, forces a TRUE or FALSE argument
into
a
numerical value of 1 or 0. If you do a search for double unary, you
might
find some better explanations, but essentially, it takes a text
argument
and
converts it (if able) into a numeric argument.
--
** John C **
Please remember if your question is answered, to mark it answered :).
It
helps everyone.


"SteveM" wrote:

What does a double hyphen do in a formual?
e.g.
=SUMPRODUCT(--(Sheet2!$A$2:$A$100=$A2),--(Sheet2!$H$2:$H$100="H98"))

I saw that as a response in a different post, and I've seen the "--"
in
other responses but have not been successful in finding it in help






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
Hard Hyphens Deeny B. Excel Discussion (Misc queries) 2 December 6th 07 05:14 AM
Formatting SS#'s without hyphens Anita Excel Discussion (Misc queries) 12 December 19th 06 07:17 PM
Using Hyphens in a cell Elaskel Excel Discussion (Misc queries) 5 July 18th 06 04:07 PM
Fixing Hyphens Good Intentions Excel Worksheet Functions 2 April 10th 06 07:39 PM
Does XL2K have "hard hyphens" (non-break hyphens)? StargateFan Excel Discussion (Misc queries) 0 January 29th 05 01:36 PM


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