Formula Errors

Fix Unexpected COUNTIFS Date Counts in Excel and Google Sheets

Elise WilliamsElise Williams Nov 18, 2026 873 views

Question details

Determine why COUNTIFS returns an unexpected count for a date range.

Fix Unexpected COUNTIFS Date Counts in Excel and Google Sheets
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.
Before you start

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.

Solution 1Recommended

Use DATE criteria and an exclusive end date

Use this formula to avoid regional date ambiguity and include all times on the final day.

1
Enter the formula

Select the cell where you want the count and enter =COUNTIFS(A1:A131486,">="&DATE(2022,8,1),A1:A131486,"<"&DATE(2022,8,31)).

2
Adjust the range and dates

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.

3
Check the result

Press Enter. The formula counts genuine date values from August 1 through August 30, including entries with times on August 30.

Use DATE criteria and an exclusive end date
Why use the next day?: A criterion of <=DATE(2022,8,30) can exclude entries with a time later on August 30. Using <DATE(2022,8,31) includes the whole day.
Count dates in WPS Spreadsheet

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. 1. Open your workbook: Open WPS Spreadsheet and use Open to select your Excel workbook.
  2. 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. 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. 4. Review and save: Press Enter to calculate the count, check any unexpected entries, and choose Save to keep the workbook.
Count dates with unambiguous DATE criteriaInclude time values on the final day using an exclusive boundaryOpen and edit Microsoft Excel XLSX and XLS filesUse a familiar spreadsheet interface
microsoft office alternative - wps office

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.