View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.misc
Bob Phillips Bob Phillips is offline
external usenet poster
 
Posts: 10,593
Default Using "--" as an array formula shortcut / alternative

It's called a double unary. See
http://www.xldynamic.com/source/xld.SUMPRODUCT.html for a detailed
explanation.

--
---
HTH

Bob


(there's no email, no snail mail, but somewhere should be gmail in my addy)



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