How to Use COUNTIFS to Count Dates in a Specific Month
Question details
The user needs to count spreadsheet records for a specific condition (like a person's name) that fall within a specific month and year, without using unreliable text wildcards.

- Product
- Spreadsheets
- Device & OS
- not provided
- Scenario
- Counting occurrences of a specific individual's records restricted to a designated calendar month.
- Observed behavior
- Attempting to use text wildcards like '*.04.2024' inside the COUNTIFS function fails to count the matching records because dates are stored as serial numbers rather than text strings.
Verify that your dates are formatted as true date values and not plain text. You can test this by temporarily changing the cell format to 'General' to ensure the date converts to a 5-digit serial number.
Use COUNTIFS with Greater Than and Less Than Date Boundaries
Define a start date and an end date boundary within the COUNTIFS function to accurately capture all dates falling within a given month.
Spreadsheet applications store dates as sequential serial numbers, meaning wildcard text searches will not work properly on them. The most reliable method to count dates in a specific month is to evaluate if the date is greater than or equal to the first day of the month, and strictly less than the first day of the following month.
Start your formula by specifying your primary condition. For example, to count records for 'John Doe' in column A, type: =COUNTIFS(A21:A500,"John Doe",
Use the DATE function with a greater-than-or-equal-to operator to specify the start of the month. Add this to your formula: B21:B500,">="&DATE(2024,4,1),
Use a strictly-less-than operator targeting the first day of the next month to ensure times on the last day are included. Add: B21:B500,"<"&DATE(2024,5,1)
The final formula should be: =COUNTIFS(A21:A500,"John Doe",B21:B500,">="&DATE(2024,4,1),B21:B500,"<"&DATE(2024,5,1)). Press Enter to execute the calculation.

Use SUMPRODUCT as an Alternative for Direct Month Evaluation
If you prefer not to calculate exact boundary dates manually, you can use SUMPRODUCT combined with the MONTH and YEAR functions.
Calculate Dates Accurately with WPS Spreadsheet
WPS Office provides a highly capable, user-friendly Spreadsheet application that perfectly supports advanced mathematical and statistical functions like COUNTIFS and SUMPRODUCT. Handle complex date criteria effortlessly and streamline your daily reporting workflow.
- 1. Open Your Dataset in WPS Spreadsheet: Launch WPS Office, create or open your existing workbook containing the date logs you need to summarize.
- 2. Access the Function Menu: Navigate to the Formulas tab on the ribbon and click 'Insert Function' to easily input your COUNTIFS date boundaries without syntax errors.
- 3. Apply and Analyze: Confirm the formula to get accurate date counts, and use the drag-fill handle to copy the logic across your monthly summary table.

Frequently Asked Questions
Why can't I use wildcards like '*' to count dates in COUNTIFS?
Spreadsheet software stores dates as sequential serial numbers (for instance, April 1, 2024, is stored as 45383) rather than as text strings. Wildcard characters like '*' or '?' only operate on text values, so attempting to use them on date formats yields a count of zero.
How do I count dates for the current month dynamically using COUNTIFS?
You can combine COUNTIFS with the EOMONTH and TODAY functions to automatically adjust to the current month. For example: =COUNTIFS(B:B, ">="&EOMONTH(TODAY(),-1)+1, B:B, "<="&EOMONTH(TODAY(),0)).
Does COUNTIFS work if my dates are stored as plain text?
Yes, if the dates are explicitly stored as text strings instead of true date values, text wildcards will work. However, this restricts your ability to sort chronologically or perform date arithmetic. It is highly recommended to convert them to true dates using the 'Text to Columns' feature and use proper date boundaries instead.




