Countif

M

majestyk

I need to count the occurences of dates between a range, either a week or
calendar month. I have so far:
=COUNTIF(Presentations,AND(">="&"1/03/08","<="&"31/03/08"))
(**dates are dd/mm/yyy for Australia**). I keep getting an answer of 0 where
it should be 7.
 
D

Don

ok, not sure how to put an And within a countif statement but you can group
two countifs togther

Note that March 1, 2008 in Excel is 39508 and March 31, 2008 is 39538

So we can do

=COUNTIF(Presentations,">=39508")-COUNTIF(Presentations,">39538")

should work I hope
 
T

T. Valko

Try this:

=COUNTIF(Presentations,">="&DATE(2008,3,1))-COUNTIF(Presentations,">"&DATE(2008,3,31))

Better to use cells to hold the date boundaries:

A1 = lower date boundary = 1/3/2008 (d/m/y)
B1 = upper date boundary = 31/3/2008 (d/m/y)

=COUNTIF(Presentations,">="&A1)-COUNTIF(Presentations,">"&B1)

If you want to count for a specific month and the dates all fall within the
same year, or the year doesn't matter:

=SUMPRODUCT(--(MONTH(Presentations)=3))

Counts all dates in the month of March of *any* year.
 

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