Excel is very forgiving.
I wouldn't have mixed and matched. I would have used separate arguments.
=SUMPRODUCT(--((Odyssey!$AH$2:$AH$999="N")+(Odyssey!$AH$2:$AH$99 9="U")),
--(Odyssey!$AM$2:$AM$999<""),
--(Odyssey!$AX$2:$AX$999=DATE(2006,7,1)),
--(Odyssey!$AX$2:$AX$999<=DATE(2006,7,31)))
The + in the first line of that expression is acting like an "or". If AH#=N or
AH#=U.
But the * in the original formula are acting like "and"'s.
Using the * or using separate arguments pretty much boils down to what you
like. I like the separate arguments. I think it's easier to read/modify.
s2m wrote:
Thank you to who ever suggested this site
http://www.xldynamic.com/source/xld.SUMPRODUCT.html
But I am still unclear on which unary or operator to use, ,--, *, +, -
I understand by using an arithmetic operator you will get the result of
additions or subtractions.
Here is what I'm up against.
I want to count the number of N's and U's in (column AH), that fall in the
month of July (Column AX) and contains a number in (column AM)
=SUMPRODUCT(--(Odyssey!$AH$2:$AH$999="N")+(Odyssey!$AH$2:$AH$999 ="U"),--
(Odyssey!$AM$2:$AM$999<"")*(Odyssey!$AX$2:$AX$999 =DATE(2006,7,1))*(Odyssey!
$AX$2:$AX$999<=DATE(2006,7,31)))
I am getting the correct results I just want to understand why I used *
between the dates and + between N and U and -- and the start of the formula.
Thanks again
--
Message posted via http://www.officekb.com
--
Dave Peterson