Is the equation: =COUNTIF B:B, <9/31/2005 AND >9/1/2005 possible?

G

Guest

Is it possible to have an equation that determines a COUNTIF for a month? ie.
if I have the dates 12/5/2005 and 11/21/2005, it would count 1 for November,
and 2 for December. Or is even something that works to the effect of
=(COUNTIF B:B, "<9/31/2005 AND >9/1/2005" possible?
 
M

macropod

Hi fireofeve,

It looks like you're after a count for September. In that case, try:
=(COUNTIF B:B, ">"&DATEVALUE("9/1/2005")-1)-(COUNTIF B:B,
">"&DATEVALUE("9/31/2005"))
or
=(COUNTIF B:B, ">"&DATEVALUE("8/31/2005"))-(COUNTIF B:B,
">"&DATEVALUE("9/31/2005"))

Cheers
 
B

Bob Phillips

=SUMPRODUCT(--(B1:B1000<=--"2005-09-31"),--(B1:B1000>=--"2005-09-01"))

or how about

=SUMPRODUCT(--(MONTH(B1:B1000)=9))

Note that SUMPRODUCT doesn't work with complete columns, you have to specify
a range.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
G

Guest

Thank you!

Bob Phillips said:
=SUMPRODUCT(--(B1:B1000<=--"2005-09-31"),--(B1:B1000>=--"2005-09-01"))

or how about

=SUMPRODUCT(--(MONTH(B1:B1000)=9))

Note that SUMPRODUCT doesn't work with complete columns, you have to specify
a range.

--
HTH

Bob Phillips

(replace somewhere in email address with gmail if mailing direct)
 
G

Guest

thank you!

macropod said:
Hi fireofeve,

It looks like you're after a count for September. In that case, try:
=(COUNTIF B:B, ">"&DATEVALUE("9/1/2005")-1)-(COUNTIF B:B,
">"&DATEVALUE("9/31/2005"))
or
=(COUNTIF B:B, ">"&DATEVALUE("8/31/2005"))-(COUNTIF B:B,
">"&DATEVALUE("9/31/2005"))

Cheers
--
macropod
[MVP - Microsoft Word]


fireofeve said:
Is it possible to have an equation that determines a COUNTIF for a month? ie.
if I have the dates 12/5/2005 and 11/21/2005, it would count 1 for November,
and 2 for December. Or is even something that works to the effect of
=(COUNTIF B:B, "<9/31/2005 AND >9/1/2005" possible?
 

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