View Single Post
  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
nadine nadine is offline
external usenet poster
 
Posts: 216
Default Help - Function Count, but on dates not numbers

tried the formula:
=COUNTIF(A1:A20,""&DATE(2007,7,1))-COUNTIF(A1:A20,"="&DATE(2007,7,31))


But the results provide an incorrect count.

We have a column with multiple dates over 3 years. But want to only count
how many records there are that are between the dates 01-APR-07 and 31-MAR-08.
If count manually should get 41 records, but calculation gives results of
37.

Thanks

"T. Valko" wrote:

Try one of these:

When you say:

greater then "specific date" and less then "specific date".


I'm assuming you do not want to include the start date and the end date.

=COUNTIF(A1:A20,""&DATE(2007,7,1))-COUNTIF(A1:A20,"="&DATE(2007,7,31))

Or:

C1 = 7/1/2007
D1 = 7/31/2007

=COUNTIF(A1:A20,""&C1)-COUNTIF(A1:A20,"="&D1)

If you *do* want to include the start date and end date:

=COUNTIF(A1:A20,"="&DATE(2007,7,1))-COUNTIF(A1:A20,""&DATE(2007,7,31))

=COUNTIF(A1:A20,"="&C1)-COUNTIF(A1:A20,""&D1)


--
Biff
Microsoft Excel MVP


"Nadine" wrote in message
...
Hi, not sure if I can get help here on this are not but.....

Trying to create a formula where it counts the number of records that is
greater then .... but less then....
Problem is I know how to do this if the cells contain numbers. But can't
figure out how to do the formula where the cells/columns have DATEs as
it's
contents.

Want the formula to - count the number of records that have dates that are
greater then "specific date" and less then "specific date". And return
the
results of how many records meet that criteria.

Thanks if any one can help.
Nadine