Count cells within a date range

D

Dewayne

Is there a way to count only the cells that fall within a defined date range?
Example:
Count only the number of cells in a range that fall within the date range of
7/01/06 through 7/31/o6.
Thanks for any help
 
B

Biff

Hi!

One way:

=COUNTIF(A:A,">=7/1/2006")-COUNTIF(A:A,">7/31/2006")

Better to use cells to hold the criteria:

B1 = 7/1/2006
C1 = 7/31/2006

=COUNTIF(A:A,">="&B1)-COUNTIF(A:A,">"&C1)

Format the cell as GENERAL

Biff
 
J

JMB

where your data is in A1:A10, and B1:B2 contain 7/1/06 and 7/31/06, try:

=COUNTIF(A1:A10, ">="&B1) - COUNTIF(A1:A10, ">"&B2)
 
D

Dave Peterson

And to avoid the 2005, 2004, 2003, ... dates

=sumproduct(--(text(c2:c5,"yyyymm")="200607"))
 

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