Filter within the last 365

garypea123

Board Regular
Joined
Mar 16, 2020
Messages
221
Office Version
  1. 365
Platform
  1. Windows
Good Morning All,

Hopefully a simple one but I am looking to create an auto-filter which will only return results for anything in the last 365 days (A rolling list so to speak)

Below is a very simplified table :)

In F2 I have put =FILTER(B2:D4,B2:B4<365,) which is always going to be wrong as it would not understand the 365 as being days. But hoping somebody can tell me the correct way to write this.

Filter Days.JPG
 

Excel Facts

Which Excel functions can ignore hidden rows?
The SUBTOTAL and AGGREGATE functions ignore hidden rows. AGGREGATE can also exclude error cells and more.
probably simpler formulas
But how about
=FILTER(B2:D10,(B2:B10<DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())))*(B2:B10<>""))

rather than 365 - i have used 1 year here
DATE(YEAR(TODAY())-1

BUT you could change to
=FILTER(B2:D10,(B2:B10<DATE(YEAR(TODAY()),MONTH(TODAY()),DAY(TODAY())-365))*(B2:B10<>""))

Book2
ABCDEFGH
1
21/1/24a1b11/1/23a3b3
31/2/24a2b22/1/23a4b4
41/1/23a3b32/1/35a5b5
52/1/23a4b4
62/1/35a5b5
7
8
9
Sheet1
Cell Formulas
RangeFormula
F2:H4F2=FILTER(B2:D10,(B2:B10<DATE(YEAR(TODAY())-1,MONTH(TODAY()),DAY(TODAY())))*(B2:B10<>""))
Dynamic array formulas.
 
Upvote 0
Another option based on 1year rather than 365 days
Excel Formula:
=FILTER(B2:D4,B2:B4>EDATE(TODAY(),-12))
 
Upvote 0
Solution
Thanks people - Going to take a look at these today as spreadsheet day :)

Will mark as solution when I have gone through, but thank you for your help as usual
 
Upvote 0
Glad we could help & thanks for the feedback.
 
Upvote 0

Forum statistics

Threads
1,215,159
Messages
6,123,348
Members
449,097
Latest member
thnirmitha

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top