count-records-between-two-dates

This blog article is one out of  four articles on the same subject.

Someone googled "Count records between date range" and landed on my website. I realize I have not covered this problem.

Yellow cells are user input cells.

How do I automatically count records in a specific date range?

=SUM(IF(($A$2:$A$10<$D$2)*($A$2:$A$10>$D$1), 1, 0)) + Ctrl + Shift + Enter

Alternative formula: =SUMPRODUCT(--($A$2:$A$10<$D$2),--($A$2:$A$10>$D$1)) + ENTER

This is an array formula so make sure you press Ctrl + Shift + Enter.

If you want to count the start date and end date also, try this formula:

=SUM(IF(($A$2:$A$10<=$D$2)*($A$2:$A$10>=$D$1),1,0)) + Ctrl + Shift + Enter

Alternative formula: =SUMPRODUCT(--($A$2:$A$10<=$D$2),--($A$2:$A$10>=$D$1)) + ENTER

count-records-between-two-dates2

Download excel sample file for this tutorial.
count-records-between-two-dates-in-excel
(Excel 97-2003 Workbook *.xls)

Functions in this article:

SUM(number1,[number2],)
Adds all the numbers in a range of cells

IF(logical_test;[value_if:true];[value_if_false])
Checks whether a condition is met, and returns one value if TRUE, and another value if FALSE

This blog article is one out of  four articles on the same subject.

  • Share/Bookmark

Related posts:

  1. Count date records between two dates in a range in excel
  2. Count unique records by date in excel
  3. Sum values between two dates with criteria in excel
  4. Most common value between two dates in a range in excel
  5. Count unique distinct records in a date range and a numeric range in excel
  6. Most common value between two dates in excel
  7. Count unique distinct values in a column in excel
  8. Count unique and unique distinct values in a multicolumn range in excel
  9. Count duplicate distinct values in a column in excel
  10. Count unique distinct months in excel