ExcelReady
CourseMock testsFunction guidesBlog
Start freeStart learning for free
ExcelReady

Be Excel-ready before day one. Hands-on practice in your browser, with instant feedback.

Learn

  • Course
  • Mock tests
  • Function guides
  • Blog

Test prep

  • Excel level test
  • Excel test practice
  • Free screening quiz
  • Certificate

Company

  • Editorial policy
  • Contact
  • Terms
  • Privacy

© 2026 ExcelReady. All rights reserved.

  1. Blog
  2. Dynamic arrays
  3. FILTER by Date in Excel: Month, Range or Recent

FILTER by Date in Excel: Month, Range or Recent

By ExcelReady Team·Updated November 1, 2026·6 min read

The short answer

To filter by date in Excel with a formula, give FILTER two date tests multiplied together. For March 2024: =FILTER(A2:C9,(A2:A9>=DATE(2024,3,1))*(A2:A9<=DATE(2024,3,31))). Put the start and end dates in cells to change the range without editing the formula. For recent rows, use A2:A9>=TODAY()-30. FILTER needs Excel 2021, Excel 2024 or Microsoft 365.

Key takeaways

  • Compare the date column with >= and <=, wrap each test in brackets and multiply them for AND.
  • Build dates with DATE(year,month,day) or point at cells; never type a date as text inside the formula.
  • For one month, MONTH() and YEAR() tests work too, as long as you check the year as well.
  • TODAY()-30 gives a rolling last-30-days filter that updates every day.
  • If dates hold times, use less than the next day, not less than or equal to the last day.
On this page+
  1. The basic formula to filter by date
  2. How to filter between two dates
  3. How to filter by month or year
  4. How to filter recent dates, like the last 30 days
  5. How to filter by date and another condition
  6. Why is my date filter wrong or empty?
  7. Practise it

To filter by date in Excel with a formula, use FILTER with a test on the date column, such as "on or after March 1 and on or before March 31". The formula returns every matching row and updates when the data or the dates change. This guide covers a date range, a single month, the last 30 days, and the problems that make date filters return nothing.

The basic formula to filter by date#

FILTER returns the rows of a range where a test is TRUE. For dates, the test compares the date column with a date:

Excel formula
=FILTER(array, include, [if_empty])
  • array is the data you want back, such as A2:C9.
  • include is the test, such as A2:A9>=DATE(2024,3,1).
  • if_empty (optional) is what to show when nothing matches.

FILTER needs Excel 2021, Excel 2024 or Microsoft 365. The FILTER function guide lists every argument, and the beginner's guide to FILTER covers non-date tests.

All the examples use this order list in A1:C9:

ABC
1DateCustomerAmount
226-Feb-2024Acme1200
34-Mar-2024Birch850
411-Mar-2024Cedar2300
519-Mar-2024Acme640
628-Mar-2024Delta1750
72-Apr-2024Birch990
815-Apr-2024Cedar1400
930-Apr-2024Delta2050

How to filter between two dates#

To keep rows between a start and an end date, write two tests, wrap each in brackets and multiply them. Multiplying means AND: a row passes only if both tests are TRUE.

Excel formula
=FILTER(A2:C9,(A2:A9>=DATE(2024,3,1))*(A2:A9<=DATE(2024,3,31)))

The result is the four March orders: Birch 850, Cedar 2,300, Acme 640 and Delta 1,750. DATE(2024,3,1) builds the date from year, month and day, so it works the same in every regional date format. Don't type "3/1/2024" in quotes: that is text, not a date.

Use cells for the start and end dates#

Hard-coded dates mean editing the formula every month. Put the start date in E2 and the end date in F2, then:

Excel formula
=FILTER(A2:C9,(A2:A9>=E2)*(A2:A9<=F2),"No orders")

Change E2 to 15-Mar-2024 and F2 to 10-Apr-2024, and the result becomes Acme 640, Delta 1,750 and Birch 990. The "No orders" text appears if the range has no matches, instead of a #CALC! error. This is the same idea as the input cells in summing by a date range.

How to filter by month or year#

To filter one month, test the month number and the year with MONTH and YEAR:

Excel formula
=FILTER(A2:C9,(MONTH(A2:A9)=3)*(YEAR(A2:A9)=2024))

This returns the same four March rows. Always include the year test. Without it, a list that covers several years returns March 2023, March 2024 and March 2025 together.

For a whole year, one test is enough: =FILTER(A2:C9,YEAR(A2:A9)=2024). For a quarter, compare the month with a range: (MONTH(A2:A9)>=4)*(MONTH(A2:A9)<=6) for April to June.

Pick the month from a cell#

If E2 holds any date in the month you want, EOMONTH can build the first and last day for you:

Excel formula
=FILTER(A2:C9,(A2:A9>=EOMONTH(E2,-1)+1)*(A2:A9<=EOMONTH(E2,0)))

EOMONTH(E2,-1) is the last day of the month before, so adding 1 gives the 1st of the month. EOMONTH(E2,0) is the last day of E2's month. Type 15-Apr-2024 in E2, and the filter shows the three April orders: Birch 990, Cedar 1,400 and Delta 2,050. Nobody needs to know how many days each month has.

The range method in the previous section is a little faster on big data, because Excel doesn't need to run MONTH on every row. Both give the same answer.

How to filter recent dates, like the last 30 days#

For a rolling window, compare the dates with TODAY, which returns the current date:

Excel formula
=FILTER(A2:C9,A2:A9>=TODAY()-30)

This keeps orders from the last 30 days, and the window moves forward every day. A few variations:

Needinclude test
Last 7 days, including today(A2:A9>TODAY()-7)*(A2:A9<=TODAY())
Before a cutoff date in E2A2:A9<E2
Future dates onlyA2:A9>TODAY()
Weekend dates onlyWEEKDAY(A2:A9,2)>5

To show the newest rows first, wrap the result in SORT: =SORT(FILTER(A2:C9,A2:A9>=TODAY()-30),1,-1). The 1 sorts by the first column (the date) and -1 means descending.

How to filter by date and another condition#

Add more brackets to the multiplication for more AND conditions. March orders from Acme only:

Excel formula
=FILTER(A2:C9,(A2:A9>=E2)*(A2:A9<=F2)*(B2:B9="Acme"))

With March in E2:F2, that returns one row: 19-Mar-2024, Acme, 640. For OR logic, add the tests with + instead of multiplying. The guide to FILTER with multiple criteria explains both in detail, and FILTER with text that contains a word covers partial matches.

Why is my date filter wrong or empty?#

Date filters fail for a few predictable reasons. Check these in order:

  1. Dates stored as text. Imported dates often sit on the left of the cell and don't change with the number format. Excel treats text as larger than any number, so >= tests pass and <= tests fail. Convert the column with DATEVALUE or Data > Text to Columns.
  2. Dates with times. A cell holding 31-Mar-2024 2:30 PM is larger than 31-Mar-2024, so <=DATE(2024,3,31) drops it. Use <DATE(2024,4,1) instead: "before the next day".
  3. Dates typed as text in the formula. A2:A9>="1/3/2024" compares with text. Use DATE or a cell.
  4. Results show as numbers. 45355 is just 4-Mar-2024 as a serial number. Format the first column of the result as Short Date.
  5. #SPILL! error. The cells below or to the right of the formula aren't empty. Clear them.

Once the rows are right, you can total them. See how to sum or count FILTER results, which returns 5,540 for the March amounts above.

Practise it#

Date ranges are one of the most common filter tasks in finance and operations tests. Practise FILTER in a live spreadsheet: you type the formula and it checks it instantly. Then practise dates in criteria with COUNTIFS and SUMIFS to total a date range. Try the March exercise on this page first.

Try it yourself

This is a live spreadsheet. Type the formula in the green cell and press Enter.

Show only the March 2024 orders. E2 holds the start date and F2 the end date. In E5, use FILTER on A2:C9 with two date tests multiplied together.

fx
ABCDEFG
1
Date
Customer
Amount
Start
End
2
45348
Acme
1200
45352
45382
3
45355
Birch
850
4
45362
Cedar
2300
March orders
5
45370
Acme
640
6
45379
Delta
1750
7
45384
Birch
990
8
45397
Cedar
1400
9
45412
Delta
2050
10
11
12

Tip: Test 1: A2:A9>=E2. Test 2: A2:A9<=F2. Put each in brackets with * between them.

Practise this in a lesson

LessonFILTER: pull matching rows with a formulaReturn every row that meets one or more conditions with FILTER, and show a friendly message when nothing matches.LessonDates in criteria: totals by date range and monthCount and total rows between two dates with COUNTIFS and SUMIFS, build a monthly summary, and drive the date range from input cells.Function guideFILTERReturn every row that matches a condition with Excel's FILTER. Multiple criteria, empty results and #SPILL! explained, with live practice.

Frequently asked questions

How do I filter between two dates in Excel with a formula?

+

Use =FILTER(data,(dates>=start)(dates<=end)), for example =FILTER(A2:C9,(A2:A9>=E2)(A2:A9<=F2)) with the start date in E2 and the end date in F2. Multiplying the two tests means both must be true.

How do I filter by month in Excel?

+

Test the month and the year: =FILTER(A2:C9,(MONTH(A2:A9)=3)*(YEAR(A2:A9)=2024)). Without the year test, March of every year is included.

How do I filter the last 30 days in Excel?

+

Compare the dates with TODAY: =FILTER(A2:C9,A2:A9>=TODAY()-30). The result changes every day because TODAY always returns the current date.

Why does my FILTER by date return #CALC! or nothing?

+

#CALC! means no row matched. Often the dates are stored as text, so the comparison fails. Convert them to real dates, and add a third argument such as "No orders" to show a message instead of the error.

Why do my filtered dates show as numbers?

+

Excel stores dates as serial numbers, and the spilled cells may not have a date format. Select the date column of the result and apply Short Date from the Home tab.

Sources

  • FILTER function - Microsoft Support
  • DATE function - Microsoft Support
  • MONTH function - Microsoft Support

Written and checked by the ExcelReady Team. First published November 1, 2026. The practice exercise runs in the same formula engine as our lessons. Found a mistake? Read our editorial policy or email hello@excelready.app.

On this page

  1. The basic formula to filter by date
  2. How to filter between two dates
  3. How to filter by month or year
  4. How to filter recent dates, like the last 30 days
  5. How to filter by date and another condition
  6. Why is my date filter wrong or empty?
  7. Practise it

Keep reading

Dynamic arrays· 6 min read

The FILTER Function in Excel (With AND and OR)

FILTER returns every row of a range that passes a test: =FILTER(A2:C9,B2:B9="East"). The matching rows spill into the cells below and update when the data changes. For AND, multiply tests in brackets; for OR, add them. The third argument shows a message when nothing matches. FILTER needs Excel 2021, Excel 2024 or Microsoft 365.

Conditional math· 7 min read

Sum by Date Range or Month in Excel With SUMIFS

To sum between two dates, give SUMIFS the same date column twice: once with ">="&start and once with "<"&end. For January 2025, write =SUMIFS(D2:D9,A2:A9,">="&DATE(2025,1,1),A2:A9,"<"&DATE(2025,2,1)). Keep the operator in quotes and join the date with &. Using "before the 1st of next month" works for every month.

Dynamic arrays· 6 min read

Sum, Count or Average FILTER Results in Excel

To sum FILTER results in Excel, put FILTER inside SUM: =SUM(FILTER(D2:D9,B2:B9="East")) adds the sales of East rows only. Swap SUM for COUNT, AVERAGE or MAX for other answers. Add 0 as FILTER's third argument so no matches return 0 instead of #CALC!. To total rows left visible by the filter buttons, use =SUBTOTAL(109,D2:D9).

Don't just read about Excel. Do it.

Practise real formulas in a live spreadsheet with instant feedback, right in your browser. Nothing to download.

Start learning for free