Filtering by date range that overlaps on a year

Brennen81

New Member
Joined
Sep 12, 2018
Messages
2
https://drive.google.com/open?id=1qmr0dN8wXFmj94601VTttQGqJv4YBarC

Hello all,


In the linked spreadsheet above you will see that I have a set of data with dates from 2004 to present. What I am trying to do is be able to filter out the same range (variable) of days in the year for all years in data.

For example, today is September 12th, I would like to see all data that occurred +/- 90 days from today in each of the previous years.

I was able to almost do this by adding a column and reassigning all of the dates to the same year, then using a formula with greater than or less than. The problem is when the range overlaps the year on December 31st/January 1st. The filter doesn't work.

For example, 120 days from today (September 12) is January 10th, the filter wont bring back anything from January 1-9 because those dates are all defaulted to the same year.

Does anyone see an easier way to do this?

Thanks so much!!!
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
Cross posted https://www.excelforum.com/excel-fo...ng-by-date-range-that-overlaps-on-a-year.html

While we do not prohibit Cross-Posting on this site, we do ask that you please mention you are doing so and provide links in each of the threads pointing to the other thread (see rule 13 here along with the explanation: Forum Rules).
This way, other members can see what has already been done in regards to a question, and do not waste time working on a question that may already be answered.
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,176
Members
453,021
Latest member
Justyna P

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