Fix Unexpected COUNTIFS Date Counts in Excel and Google Sheets
Question details
Determine why COUNTIFS returns an unexpected count for a date range.

- Product
- Microsoft Excel and Google Sheets
- Device & OS
- not provided
- Scenario
- Count entries from August 1 through August 30, 2022, in a spreadsheet column.
- Observed behavior
- The count may be incorrect if date criteria are interpreted differently, cells contain text instead of dates, or date values include times.
Identify the cells containing the dates and confirm the intended first and last days. The examples use A1:A131486; replace that range with your own.
Use DATE criteria and an exclusive end date
Use this formula to avoid regional date ambiguity and include all times on the final day.
Select the cell where you want the count and enter =COUNTIFS(A1:A131486,">="&DATE(2022,8,1),A1:A131486,"<"&DATE(2022,8,31)).
Replace A1:A131486 with your date range. Change the first DATE to the start day and the second DATE to the day after the intended last day.
Press Enter. The formula counts genuine date values from August 1 through August 30, including entries with times on August 30.

Check and convert dates stored as text
Use this check when the formula still misses entries that appear to be dates.
Count dates accurately in WPS Spreadsheet
Open your workbook in WPS Spreadsheet and use COUNTIFS with DATE boundaries to count a full date range without relying on an ambiguous text date.
- 1. Open your workbook: Open WPS Spreadsheet and use Open to select your Excel workbook.
- 2. Enter the count formula: Select an empty cell and enter =COUNTIFS(A1:A131486,">="&DATE(2022,8,1),A1:A131486,"<"&DATE(2022,8,31)).
- 3. Adapt the criteria: Replace the example range and DATE arguments with your own range, start date, and the day after your intended end date.
- 4. Review and save: Press Enter to calculate the count, check any unexpected entries, and choose Save to keep the workbook.

Frequently Asked Questions
Why does COUNTIFS miss dates on the last day?
Cells may contain times as well as dates. Use a criterion such as "<"&DATE(2022,8,31) to include every time on August 30.
Does changing a cell's format turn a text date into a real date?
No. Test the cell with =ISNUMBER(A1), then convert text dates using Excel's Data > Text to Columns or Google Sheets' DATEVALUE function with the appropriate locale.
Why can a date written as 01/08/2022 be ambiguous?
Depending on regional settings, it may be interpreted as January 8 or August 1. Use DATE(2022,8,1) in the COUNTIFS criterion to specify August 1 explicitly.
Does ISNUMBER confirm that a cell contains the correct date?
No. =ISNUMBER(A1) confirms that the cell contains a number, but you should also display it as a date and verify the day, month, and year.




