Count cells within a date range

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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
 
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
 
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)
 
And to avoid the 2005, 2004, 2003, ... dates

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