Hi JE
and shortening the formula more and more: only using one '-' as you
have exactly two conditions to multiply
For the OP though this will work without any problems you may use the
double unary operator:
=SUMPRODUCT(--(YEAR(Sheet1!A1:A1000)=2004),--(Sheet1!J1:J1000<>""))
Otherwise you may have a problem if you add a third condition like
=SUMPRODUCT(-(YEAR(Sheet1!A1:A1000)=2004),-(Sheet1!J1:J1000<>""),-(Shee
t1!B1:B1000)="something"))
this would result in a negative count. Instead
=SUMPRODUCT(--(YEAR(Sheet1!A1:A1000)=2004),--(Sheet1!J1:J1000<>""),--(S
heet1!B1:B1000)="something"))
woule get you your desired result
---
Explanation:
the mathematical operator '-' or '--' coerces the bolean values to a
number.
'-' will do the following:
TRUE = -1
FALSE = 0
'--' will do
TRUE = 1
FALSE = 0