Hi,
If you reread the responses its there.
The portions of the formula that read
B2:B22 = "associate"
return a series of TRUE's and FALSE's even if you don't see them.
when you add a minus sign in front of this:
-(B2:B22 = "associate")
Excel change the TRUE's to -1's and the FALSE's to 0's
But we don't want negative 1's so we convert the negatives back to positive
by
--(B2:B22 = "associate")
The SUMPRODUCT function multiplies all the 0's and 1's times each other, 0*0
= 0
1*1 = 1 . 1*0 = 0*1 = 0. So anytime all conditions are met we are
multiplying a series of 1's which is 1. Anytime any of the conditions are
not met we are multiplying something times 0 which is always 0. The
SUMPRODUCT sums the 0's and 1's to give us our count.
Hope this helps.
--
Thanks,
Shane Devenshire
"Nicole Bradshaw" wrote:
Can someone tell me what the "--" does in a function? Thanks to all of you
for your help with this!
"Sandy Mann" wrote:
=SUMPRODUCT(--( B2:B22 = "associate"),--(C2:C22<""))
--
HTH
Sandy
In Perth, the ancient capital of Scotland
and the crowning place of kings
Replace @mailinator.com with @tiscali.co.uk
"Nicole Bradshaw" <Nicole wrote in
message ...
Hi, I'm trying to prepare a summary worksheet to count where
B2:B22 = "associate"
and
C2:C22 contains a date (or is not blank)
I'm sure it's doable but I'm stumped. Thanks.
Nicole