Home |
Search |
Today's Posts |
#3
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sheet1!$B$2:$B$9000 returns an array of Boolean values (True or False).
applying a math operation to these values converts them to numbers. the first negative sign converts them to negative numbers and the second converts them back to positive numbers. Then sumproduct multiplies the arrays of 1's and 0's together - anywhere you multiply 1 x 1 you get a 1 otherwise a 0. It then adds these up and gives you the count of rows matching both positions. you could do a single conversion for each column in this case since multiplication of two negatives will produce a positive: =SUMPRODUCT(-(Sheet1!$B$2:$B$9000=1),-(Sheet1! $C$2:$C$9000=14)) -- Regards, Tom Ogilvy "Todd S" wrote in message ... Hi. I've recently been introduced to the following formula through Newsgroups: =SUMPRODUCT(--(Sheet1!$B$2:$B$9000=1),--(Sheet1! $C$2:$C$9000=14)) It works for my needs, however, I'm trying to understand it for other applications. What do the -- operators do? I've never seen them before and can't find a reference. Thanks!! Todd |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
IF formula-simple question; simple operator | Excel Discussion (Misc queries) | |||
Operator Question | Excel Discussion (Misc queries) | |||
What does ^ operator mean in a formula?? | Excel Worksheet Functions | |||
What does ! mean as an operator within a formula | Excel Discussion (Misc queries) | |||
"--" operator in a formula | Excel Worksheet Functions |