#1   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Counting Dates

I would like to count the numbers of entris in a column that have the same
month and year. Each value has a date defined as mm/dd/yyyy.

Ex. how many entries are there for January 2007?

do I use countif?
  #2   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 10,124
Default Counting Dates

=sumproduct((year(a2:a22)=2007)*(month(a2:a22)=1))

--
Don Guillett
Microsoft MVP Excel
SalesAid Software

"MikeG" wrote in message
...
I would like to count the numbers of entris in a column that have the same
month and year. Each value has a date defined as mm/dd/yyyy.

Ex. how many entries are there for January 2007?

do I use countif?


  #3   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 207
Default Counting Dates

for january =COUNT(IF(MONTH($A$1:$H$1)=1,$A$1:$H$1))

press CTRL+SHIFT+ENTER not only ENTER

For feb change 1 to 2 in the formula and so on...change the range as per
your need.

hope this helps.


"MikeG" wrote in message
...
I would like to count the numbers of entris in a column that have the same
month and year. Each value has a date defined as mm/dd/yyyy.

Ex. how many entries are there for January 2007?

do I use countif?



  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 2,118
Default Counting Dates

Try something like this:

=SUMPRODUCT(--(TEXT(A2:A100,"yyyymm")="200701"))

Is that something you can work with?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"MikeG" wrote in message
...
I would like to count the numbers of entris in a column that have the same
month and year. Each value has a date defined as mm/dd/yyyy.

Ex. how many entries are there for January 2007?

do I use countif?



  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 8,651
Default Counting Dates

But that will include all January dates, not just 2007.
--
David Biddulph

"Gaurav" wrote in message
...
for january =COUNT(IF(MONTH($A$1:$H$1)=1,$A$1:$H$1))

press CTRL+SHIFT+ENTER not only ENTER

For feb change 1 to 2 in the formula and so on...change the range as per
your need.

hope this helps.


"MikeG" wrote in message
...
I would like to count the numbers of entris in a column that have the same
month and year. Each value has a date defined as mm/dd/yyyy.

Ex. how many entries are there for January 2007?

do I use countif?







  #6   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 207
Default Counting Dates

yeah i missed on that part...Don's solution is better.


"David Biddulph" <groups [at] biddulph.org.uk wrote in message
...
But that will include all January dates, not just 2007.
--
David Biddulph

"Gaurav" wrote in message
...
for january =COUNT(IF(MONTH($A$1:$H$1)=1,$A$1:$H$1))

press CTRL+SHIFT+ENTER not only ENTER

For feb change 1 to 2 in the formula and so on...change the range as per
your need.

hope this helps.


"MikeG" wrote in message
...
I would like to count the numbers of entris in a column that have the
same
month and year. Each value has a date defined as mm/dd/yyyy.

Ex. how many entries are there for January 2007?

do I use countif?







  #7   Report Post  
Posted to microsoft.public.excel.worksheet.functions
external usenet poster
 
Posts: 18
Default Counting Dates


Both Don and Ron's solutions worked. Thanks for your help


"Ron Coderre" wrote:

Try something like this:

=SUMPRODUCT(--(TEXT(A2:A100,"yyyymm")="200701"))

Is that something you can work with?
--------------------------

Regards,

Ron
Microsoft MVP (Excel)
(XL2003, Win XP)

"MikeG" wrote in message
...
I would like to count the numbers of entris in a column that have the same
month and year. Each value has a date defined as mm/dd/yyyy.

Ex. how many entries are there for January 2007?

do I use countif?




Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Counting Dates Marie Excel Discussion (Misc queries) 3 June 4th 07 01:23 AM
Counting dates.... ExcelDummie New Users to Excel 8 July 11th 06 06:18 PM
counting occasions dates occur between 2 dates hoyt New Users to Excel 5 June 16th 06 08:11 AM
Counting dates, within a list of dates jrheinschm Excel Worksheet Functions 7 April 19th 06 06:13 PM
Counting Dates billy Excel Worksheet Functions 6 December 29th 05 12:11 PM


All times are GMT +1. The time now is 04:46 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"