View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
[email protected] trippknightly@hotmail.com is offline
external usenet poster
 
Posts: 7
Default Using "--" as an array formula shortcut / alternative

On Feb 5, 12:33*pm, "Ron Coderre"
wrote:
In the case of boolean expressions (that return TRUE/FALSE), the dbl-neg
converts TRUE to 1 and FALSE to 0.

Example:
--ISNUMBER(56) converts TRUE to the number 1
--ISNUMBER("this is text") converts FALSE to the number 0

You could achieve the same results by multiplying a value by 1, but the
dbl-neg indicates to knowledgable users that a "type conversion" is being
effected.

Does that help?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

wrote in message

...



Just today I discovered that you can do some cool things w/
conditional sums of the form:


sumproduct(--(A1:A1000="West"),--(B1:B1000="Blue"),C1:C1000)


The above might give me sales in the Western region of Blue things
(column c might have the sales figures). *This appears to avoid having
to enter arrary formulas (CTRL SHIFT ENTER as well as the likely
different specification for the formula itself) and would seem to be a
lot easier to work with.


What I haven't seen documented other than quick allusions to it is
exactly what the "--" is doing. *Since "--" isn't easy to search for
on the web, I thought somebody here might be able to describe or refer
me to a documentation source online that describes what "--" (&
wrapping w/ () ) is doing. *Seems to be a shorthand way to indicate
"do an array operation with this".


Thx!,


- TK- Hide quoted text -


- Show quoted text -


I'm glad I asked. Got it. It's so obvious now that I see what it
is. Thanks for the lighting reply.