COUNTIF Between Two Dates in Excel (6 Suitable Examples)

Example 1 – Inserting Dates Directly into COUNTIFS Function to Count Between Two Dates

Steps:

=COUNTIFS($C$5:$C$16,">=01-01-1990",$C$5:$C$16,"<=12-13-1990")

  • Press Enter.

Inserting Dates Directly into COUNTIF Function

  • Use a similar type of formula in the remaining cells from F6:F10.

For Counting Between Two Dates Insert Dates Directly into the COUNTIF Function

Read More: COUNTIF That Does Not Contain Multiple Criteria in Excel


Example 2 – Combining Excel COUNTIFS & DATE Functions to Count between Two Dates

Steps:

  • Enter the following formula in cell F5.

=COUNTIFS($C$5:$C$16,">="&DATE(E5,1,1),$C$5:$C$16,"<="&DATE(E5,12,31))

  • Press Enter.

Combination of COUNTIFS and DATE Function

  • Use the Fill Handle tool for the remaining cells.

Apply COUNTIF Function with DATE Function to Count Between Two Dates

Breakdown of the Formula

DATE(E5,1,1): The DATE function will convert the numerical value into the date value. The value is 1/1/1990.

DATE(E5,12,31): The DATE function will convert the numerical value into the date value. The value is 12/31/1990.

COUNTIFS($C$5:$C$16,”>=”&DATE(E5,1,1),$C$5:$C$16,”<=”&DATE(E5,12,31)): The COUNTIFS function will count those value of dates which are between the dates 1/1/1990 and 12/31/1990. The value is 1.

Read More: COUNTIF Date Is within 7 Days


Similar Readings


Example 3 – Counting Number of Dates by SUMPRODUCT Function between Two Dates

Steps:

  • Enter the following formula in cell F5.

=SUMPRODUCT(($C$5:$C$16>=DATEVALUE("1/1/1990"))*($C$5:$C$16<=DATEVALUE("12/31/1990")))

  • Press Enter.

Applying SUMPRODUCT and DATEVALUE Function

  • Use a similar type of formula in the remaining cells from F6:F10.

Applying SUMPRODUCT and DATEVALUE Function to Count Between Two Dates

Breakdown of the Formula

DATEVALUE(“1/1/1990”): The DATEVALUE function will convert the numerical value into the date value. The value is 1/1/1990.

DATEVALUE(“12/31/1990”): The DATEVALUE function will convert the numerical value into the date value. The value is 12/31/1990.

SUMPRODUCT(($C$5:$C$16>=DATEVALUE(“1/1/1990”))*($C$5:$C$16<=DATEVALUE(“12/31/1990”))): The SUMPRODUCTS function will count the value of dates which are lied between the date 1/1/1990 and 12/31/1990. The value is 1.

Read More: How to Use COUNTIF for Date Range in Excel (6 Suitable Approaches)


Example 4 – Counting Between Any Given Dates Range

Use the COUNTIFS function to find out the number of dates in a date range. Our desired date range is in the range of cells E5:F5.

Steps:

  • Enter the following formula in the cell G5.

=COUNTIFS($C$5:$C$16,">="&E5,$C$5:$C$16,"<="&F5)

  • Press Enter.

Count Between Any Given Dates Range

 


Example 5 – Applying COUNTIFS Function Between Two Dates with Multiple Criteria

Steps:

  • Enter the following formula in cell F5.

=COUNTIFS($C$5:$C$16,">="&DATE(E5,1,1),$C$5:$C$16,"<="&DATE(E5,12,31))

  • Press Enter.

Utilizing DATE and COUNTIFS Function

  • Drag the Fill Handle icon to copy the formula up to cell F10.

COUNTIF Between Two Dates with Multiple Criteria

Breakdown of the Formula

DATE(E5,1,1): The DATE function will convert the numerical value into the date value. The value is 1/1/1990.

DATE(E5,12,31): The DATE function will convert the numerical value into the date value. The value is 12/31/1990.

COUNTIFS($C$5:$C$16,”>=”&DATE(E5,1,1),$C$5:$C$16,”<=”&DATE(E5,12,31)): The COUNTIFS function will count those value of dates which are between the dates 1/1/1990 and 12/31/1990. The value is 1.


Example 6 – Using Excel COUNTIF Function Between Two Dates with Matching Criteria

Steps:

  • Enter the following formula in F5.

=COUNTIF($C$5:$C$16,E5)

  • Press Enter to get the result.

COUNTIF Between Two Dates with Matching Criteria


Download Practice Workbook


Related Articles

Get FREE Advanced Excel Exercises with Solutions!
Shakil Ahmed
Shakil Ahmed

My name’s Shakil. My articles are targeted to support you in enriching knowledge regarding different features related to Microsoft Excel. I am fond of literature, hope some knowledge from them will help me providing you some engaging articles even though some weary technical terms.

2 Comments
  1. I love how you use Excel to do calculations!

Leave a reply

Advanced Excel Exercises with Solutions PDF

 

 

ExcelDemy
Logo