How to Use COUNTIFS with Date Ranges from Data Validation in Excel
Question details
The user wants to count records within a specific month by selecting the first day of the month from a data validation dropdown and applying it to a COUNTIFS formula.

- Product
- Excel
- Device & OS
- not provided
- Scenario
- Creating dynamic monthly reports or dashboards that filter data based on user-selected dates from a dropdown menu.
- Observed behavior
- The goal is to calculate the total count of records falling between a selected start date and the last day of that corresponding month.
Ensure that your data validation dropdown contains valid date values (e.g., the first day of the month) rather than plain text strings, as the COUNTIFS function requires actual date serial numbers to compare ranges accurately.
Using EOMONTH for Dynamic Monthly Date Ranges
Use the EOMONTH function directly inside the COUNTIFS criteria to automatically calculate the last day of the selected month.
By combining COUNTIFS with EOMONTH, you only need one input cell for the month's start date. The formula dynamically generates the end date, streamlining your dashboard setup.
Click on the cell where you want to display the final record count.
Input the formula: =COUNTIFS(T_LEAVE[START DATE],">="&A1,T_LEAVE[START DATE],"<="&EOMONTH(A1,0)) where A1 is your data validation dropdown and T_LEAVE[START DATE] is your data column.
Press Enter to calculate. The formula dynamically appends the operators ">=" and "<=" to the cell references using the & symbol.

Using Helper Cells for Start and End Dates
Dedicate two separate cells for the start and end dates if you prefer a simpler COUNTIFS structure without nested functions.
Use WPS Spreadsheet for Powerful Data Validation and Formulas
WPS Spreadsheet fully supports advanced functions like COUNTIFS and EOMONTH, making it easy to build dynamic, date-driven dashboards. It provides a seamless experience for managing complex data logic.
- 1. Open your workbook: Launch WPS Spreadsheet and open the file containing your date records.
- 2. Set up Data Validation: Navigate to the Data tab and use the Data Validation feature to create a dropdown menu for your dates.
- 3. Apply the formulas: Type the =COUNTIFS() and EOMONTH() formula combination just as you would in Excel.
- 4. Save as .xlsx: Save the file directly in .xlsx format to share and collaborate with Microsoft Excel users without losing functionality.

Frequently Asked Questions
Why is my COUNTIFS formula returning zero when using dates?
This usually happens if the dates in your criteria or data range are stored as text instead of true numerical date values. Try changing the cell format to 'Short Date' or use the VALUE function to convert text strings to standard dates.
Do I always need quotation marks around logical operators in COUNTIFS?
Yes, when using cell references as criteria, logical operators (such as ">=" or "<=") must be enclosed in quotation marks and joined to the cell reference using the ampersand (&) symbol, for example, ">="&A1.
Can I use COUNTIFS to count data between two dates from different years?
Yes, the COUNTIFS function works for any valid date range. As long as your start date and end date are correctly specified in the criteria and the data column contains valid date formats, it will count all records falling within that period regardless of the calendar year.




