Tip Printed from ExcelTip.com
Counting the Number of Excel Files in a List According to File Type and Date Criteria


Problem:

In the range A2:B6 are file names and their corresponding creation date.
How could we, for example, count the number of Excel files (".xls") created in April?

Solution:

Use the SUMPRODUCT, MONTH, and RIGHT functions as shown in the following formula:
=SUMPRODUCT((MONTH(B2:B6)=C2)*(RIGHT(A2:A6,3)=C3))