# 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.

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

## 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.

• Use the Fill Handle tool for the remaining cells.

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

## 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.

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

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.

## 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.

## 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.

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

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.

## Related Articles

Get FREE Advanced Excel Exercises with Solutions!
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.