Skip to content

How to filter rows by an inclusive date range

Heads up: Excel and Google Sheets do this differently.

Excel
=FILTER(A2:A5,(B2:B5>=DATE(2026,9,1))*(B2:B5<DATE(2026,9,16)+1))
Google Sheets
=FILTER(A2:A5,B2:B5>=DATE(2026,9,1),B2:B5<DATE(2026,9,16)+1)

Verified example

Computed by a real spreadsheet engine on the sample data below.

EventDate/time serial
Alpha46265
Beta46266
Gamma46281.75
Delta46282

=FILTER(A2:A5,(B2:B5>=DATE(2026,9,1))*(B2:B5<DATE(2026,9,16)+1))Beta | Gamma

Both expressions are checked against an independently calculated expected result in HyperFormula. This is a sample execution check, not native Excel or Google Sheets certification.

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1Paste the sample at A1:B5. Format B2:B5 as Date/time: the dates are 31 August, 1 September, 16 September at 18:00, and 17 September 2026.
  2. 2Choose an empty output column. The formula returns event names from A2:A5, not every source column.
  3. 3Use the appropriate Excel or Sheets formula, with matching range lengths.
  4. 4Beta is exactly on the lower boundary and Gamma is within the last day. Alpha and Delta are outside the interval.

Tips

Need the Google Sheets version instead? Open Sheets variant in workspace →

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Why not use <= the end date?

That includes midnight at the start of the final day but can exclude later timestamps on that date.

What if no row matches?

Google Sheets returns #N/A; Excel without its optional empty-result fallback returns #CALC!. Treat that as an empty selection, not proof the source data is valid.

Sources and compatibility

Reviewed 2026-09-16

Formulas used

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: