ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Discussion (Misc queries) (https://www.excelbanter.com/excel-discussion-misc-queries/)
-   -   Counting the number cells between two dates (https://www.excelbanter.com/excel-discussion-misc-queries/17845-counting-number-cells-between-two-dates.html)

Dave

Counting the number cells between two dates
 
Hi guys,

Hope someone can help with this, I'm pretty sure it'll be quite a simple one.

Column A:A contains a list dates, I want to use a formula to count the
number of cells which contain a date between 01/01/05 - 31/01/05.

Any ideas,

Many thanks,
Dave

Jason Morin

Try:

=SUMPRODUCT((A1:A1000=--"1/1/05")*(A1:A1000<=--
"1/31/05"))

BTW - I'm using American date formats in mine.

HTH
Jason
Atlanta, GA


-----Original Message-----
Hi guys,

Hope someone can help with this, I'm pretty sure it'll

be quite a simple one.

Column A:A contains a list dates, I want to use a

formula to count the
number of cells which contain a date between 01/01/05 -

31/01/05.

Any ideas,

Many thanks,
Dave
.


Dave Peterson

One way:

=COUNTIF(A:A,"="&DATE(2005,1,1))-COUNTIF(A:A,""&DATE(2005,1,31))
or if you can use less than the whole column:

=SUMPRODUCT(--(TEXT(A1:A999,"yyyymm")="200501"))




Dave wrote:

Hi guys,

Hope someone can help with this, I'm pretty sure it'll be quite a simple one.

Column A:A contains a list dates, I want to use a formula to count the
number of cells which contain a date between 01/01/05 - 31/01/05.

Any ideas,

Many thanks,
Dave


--

Dave Peterson

Domenic

Try...

=COUNTIF(A:A,"=1/1/2005")-COUNTIF(A:A,"1/31/2005")

Hope this helps!

In article ,
"Dave" wrote:

Hi guys,

Hope someone can help with this, I'm pretty sure it'll be quite a simple one.

Column A:A contains a list dates, I want to use a formula to count the
number of cells which contain a date between 01/01/05 - 31/01/05.

Any ideas,

Many thanks,
Dave



All times are GMT +1. The time now is 10:56 PM.

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