Excel Count Days Between Two Dates

Excel can be used to count the number of days between two dates.  To do this enter your dates in cell A2 to A11, start date in B1 and end date in C1, the following will count how many days fall within the two dates:

=SUMPRODUCT((A12:A19>=C12)*(A12:A19<=D12))

or for Excel 07 or later

=COUNTIFS(A12:A19,">="&C12,A12:A19,"<="&D12)

To extend the Excel formula to include another criterion as follows;

=SUMPRODUCT((A22:A31>=C22)*(A22:A31<=D22)*($B$22:$B$31=$E$22))

or

=COUNTIFS(A21:A31,">="&C12,A21:A31,"<="&D12,B21:B31,E22)

To add more criteria simply add it in the same way.  For instance, If the next set of criteria was in Column C then add the Excel formula below to the end of the formula above. 

*($C$12:$C$19=$F$12)

or the complete Excel formula for 4 criteria.

=SUMPRODUCT((A12:A19>=C12)*(A12:A19<=D12)*($B$12:$B$19=$E$12)*($C$12:$C$19=$F$12))

To return a text value instead of a number value then the following article may be of assistance;  Match Multiple Text Criteria

The Excel file below shows both examples.