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? |
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? |
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? |
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? |
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? |
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? |
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? |
All times are GMT +1. The time now is 02:34 AM. |
Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com