Double hyphens --

S

SteveM

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
 
J

John C

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.
 
B

Bernard Liengme

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!
 
J

John C

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.
 
J

John C

*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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top