Recording instances of month & year

M

M.Fox

I have a formula that records the instances of the month in a range. For
example =SUMPRODUCT((MONTH(Sheet1!I4:I399)=12)*1) records the number of
instances that December occurs.

My problem is that I now need it to only count the number of instances of
December 2004 and ignore the number of instances of December 2003.

Any ideas?
 
D

Daniel.M

Another way,

=SUMPRODUCT((Sheet1!I4:I399-DAY(Sheet1!I4:I399)=DATE(2004,12,))*1)

Regards,

Daniel M.
 
R

Ron Rosenfeld

I have a formula that records the instances of the month in a range. For
example =SUMPRODUCT((MONTH(Sheet1!I4:I399)=12)*1) records the number of
instances that December occurs.

My problem is that I now need it to only count the number of instances of
December 2004 and ignore the number of instances of December 2003.

Any ideas?

Here's one way using a different function:

=COUNTIF(A1:A100,">="&DATE(2004,12,1))-COUNTIF(A1:A100,">"&DATE(2004,12,31))


--ron
 
M

M.Fox

Many thanks to you all for taking the time to reply. I have tried them all
and confirm that they all work.

Once again, thanks.

Mark


M.Fox wrote in message ...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top