I am trying to create a macro that will filter a column to include values that are within three months of today, six months of today, and a year of today. How I have been doing this is defining an array to contain my dates criteria like shown below. Then I run a loop that filters for criteria1 of dates(i) and criteria2 of dates(i+6). (btw I'm sure that this is a very inefficient way to do this, but I'm an amateur and I do what I can).This works if the date segments are stationary. But now I need the segment to change as today's date changes. So if today is July 1, I want to capture april-june after the macro runs. If it is July 17, I need it to capture April 17 - July 17. Any suggestions on how to do this. Currently my criteria are stings, so I can't "subtract" 3 months from today as far as I know. Example code or even just pointers on how to do this are appreciated. Thanks.
Please Login or Register to view this content.
Bookmarks