ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   Count number of dates between a specified period of time (https://www.excelbanter.com/excel-worksheet-functions/251314-count-number-dates-between-specified-period-time.html)

Sodak

Count number of dates between a specified period of time
 
I have a column in a spreadsheet that contains the dates that inspections
occurred on. From that I want to generate a count of the number of
inspections that occurred between certain dates. Example:

Column A
2/3/09
3/4/09
3/6/09
3/6/09
5/6/09
6/5/09
7/6/09

How can I write a formula that will count the number of dates that are
between 3/1/09 and 6/30/09? I assume it would use the COUNTIF function.

Thanks.

Mike H

Count number of dates between a specified period of time
 
Hi

=SUMPRODUCT((A1:A15=DATE(2009,3,1))*(A1:A15<=DATE (2009,6,30)))

In practice I would use cell references in the formula to prevent having to
edit it

=SUMPRODUCT((A1:A15=C1)*(A1:A15<=D1))

"Sodak" wrote:

I have a column in a spreadsheet that contains the dates that inspections
occurred on. From that I want to generate a count of the number of
inspections that occurred between certain dates. Example:

Column A
2/3/09
3/4/09
3/6/09
3/6/09
5/6/09
6/5/09
7/6/09

How can I write a formula that will count the number of dates that are
between 3/1/09 and 6/30/09? I assume it would use the COUNTIF function.

Thanks.


Gary''s Student

Count number of dates between a specified period of time
 
=SUMPRODUCT((A1:A7=DATEVALUE("3/1/2009"))*(A1:A7<DATEVALUE("7/1/2009")))

--
Gary''s Student - gsnu200909


All times are GMT +1. The time now is 11:24 PM.

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