counting a cell range within a range

M

mmay321

i want to count how many cells within the range determined in th
following formula also have the value "x" in the range D2:D3000:

=SUMPRODUCT(--(MONTH(log!$A$2:$A$3000)=7),--(YEAR(log!$A$2:$A$3000)=2005))

i then want to subtract that number from the number determined by th
previous formula.

thanks
 
D

David Billigmeier

You just add in another condition to SUMPRODUCT:

=SUMPRODUCT(--(MONTH(log!$A$2:$A$3000)=7),--(YEAR(log!$A$2:$A$3000)=2005),--($D$2:$D$3000="x"))

I assume you can get the rest.
 
M

mmay321

i entered the formula:

=SUMPRODUCT(--(MONTH(log!$A$2:$A$3000)=7),--(YEAR(log!$A$2:$A$3000)=2005),--($D$2:$D$3000="x"))

and it yields the following:
1/0/1900 0:00


i don't know what that means!
 
Top