Formula guide · Excel and Google Sheets · Updated May 13, 2026

COUNTIFS Date Range

Count rows between two dates in Excel or Google Sheets with COUNTIFS.

Quick Answer

Use COUNTIFS with two conditions on the same date range: one for the start date and one for the end date.

Copyable Formula

=COUNTIFS(A2:A500,">="&F2,A2:A500,"<="&G2)

Syntax

=COUNTIFS(date_range,">="&start_date,date_range,"<="&end_date)

Excel and Google Sheets

Worked Example

AFG
Order dateStartEnd
2026-05-032026-05-012026-05-31
2026-05-18
2026-06-02

Result: Counts rows whose order dates fall inside the selected start and end dates.

Steps

  • Store the start and end dates in cells instead of typing them into the formula.
  • Use >= for the start date.
  • Use <= for the end date when your data contains dates only.
  • Use < next_day when your date column includes timestamps.

Common Mistakes

  • Typing dates as text that the spreadsheet does not recognize.
  • Forgetting to join comparison operators with ampersands.
  • Using <= end_date when the source values include times later in the day.

Excel vs Google Sheets Notes

The core idea works in both Excel and Google Sheets, but separators, function availability, and array behavior can vary by account, locale, and version.

Editorial check: This guide was last updated May 13, 2026. Formula behavior can vary by Excel version, Google Sheets rollout, and spreadsheet locale.

FAQ