ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Counting dates (https://www.excelbanter.com/excel-worksheet-functions/223932-counting-dates.html)

wendy

Counting dates
 

Trying to do something really simple here but cant seem to get it right


have a list of dates

12/01/2009
13/01/2009
12/01/2009
13/02/2009
14/01/2009


obviously the list is longer!

all i want to be able to do is count the number of entries for eg. jan

have tried =countif(A1:A5,"=**/01/2009")

but this just returns an error message

can anyone help prob dead simple if you know how!
thanks
wend




--
wendy

T. Valko

Counting dates
 
all i want to be able to do is count the
number of entries for eg. jan


For January of *any* year or will your dates all be within the same year?

For January of *any* year:

=SUMPRODUCT(--(MONTH(A1:A100)=1)

Note that if there are any empty cells in the range they will be evaluated
as month 1 (January). To account for that:

=SUMPRODUCT(--(MONTH(A1:A100)=1),--(A1:A100<""))

To count for a specific year:

=SUMPRODUCT(--(MONTH(A1:A100)=1),--(YEAR(A1:A100)=2009))


--
Biff
Microsoft Excel MVP


"wendy" wrote in message
...

Trying to do something really simple here but cant seem to get it right


have a list of dates

12/01/2009
13/01/2009
12/01/2009
13/02/2009
14/01/2009


obviously the list is longer!

all i want to be able to do is count the number of entries for eg. jan

have tried =countif(A1:A5,"=**/01/2009")

but this just returns an error message

can anyone help prob dead simple if you know how!
thanks
wend




--
wendy




wendy

Counting dates
 

T. Valko;3241754 Wrote:
all i want to be able to do is count the-
number of entries for eg. jan-

For January of *any* year or will your dates all be within the same
year?

For January of *any* year:

=SUMPRODUCT(--(MONTH(A1:A100)=1)

Note that if there are any empty cells in the range they will be
evaluated
as month 1 (January). To account for that:

=SUMPRODUCT(--(MONTH(A1:A100)=1),--(A1:A100""))

To count for a specific year:

=SUMPRODUCT(--(MONTH(A1:A100)=1),--(YEAR(A1:A100)=2009))


--
Biff
Microsoft Excel MVP


"wendy" wrote in message
...-

Trying to do something really simple here but cant seem to get it
right


have a list of dates

12/01/2009
13/01/2009
12/01/2009
13/02/2009
14/01/2009


obviously the list is longer!

all i want to be able to do is count the number of entries for eg.
jan

have tried =countif(A1:A5,"=**/01/2009")

but this just returns an error message

can anyone help prob dead simple if you know how!
thanks
wend




--
wendy -

perfect thank you so much x




--
wendy

T. Valko

Counting dates
 
You're welcome. Thanks for the feedback!

--
Biff
Microsoft Excel MVP


"wendy" wrote in message
...

T. Valko;3241754 Wrote:
all i want to be able to do is count the-
number of entries for eg. jan-

For January of *any* year or will your dates all be within the same
year?

For January of *any* year:

=SUMPRODUCT(--(MONTH(A1:A100)=1)

Note that if there are any empty cells in the range they will be
evaluated
as month 1 (January). To account for that:

=SUMPRODUCT(--(MONTH(A1:A100)=1),--(A1:A100""))

To count for a specific year:

=SUMPRODUCT(--(MONTH(A1:A100)=1),--(YEAR(A1:A100)=2009))


--
Biff
Microsoft Excel MVP


"wendy" wrote in message
...-

Trying to do something really simple here but cant seem to get it
right


have a list of dates

12/01/2009
13/01/2009
12/01/2009
13/02/2009
14/01/2009


obviously the list is longer!

all i want to be able to do is count the number of entries for eg.
jan

have tried =countif(A1:A5,"=**/01/2009")

but this just returns an error message

can anyone help prob dead simple if you know how!
thanks
wend




--
wendy -

perfect thank you so much x




--
wendy





All times are GMT +1. The time now is 01:19 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com