bottom
Great ExcelTips!
         
Your e-mail address is safe!
Close Note

Tips.Net > ExcelTips Home > Filtering > AutoFilter > Filtering to a Date Range in the Past

Filtering to a Date Range in the Past

Summary: If you have a large number of data records, each with an associated date, you might want to filter that data so you see only the records from within the past month or so. You can do this easily by using the technique described in this tip. (This tip works with Microsoft Excel 97, Excel 2000, Excel 2002, Excel 2003, and Excel 2007.)

Bill has a data table with fifty columns and many, many records. One of the columns contain a record date, with dates that range over the past three years. Bill asked if there was a way to create a filter criteria to display only those records with dates between 91 and 98 days ago.

One solution is to add a new column to your data table that indicates if the record date is in the desired timeframe. Assuming the record date is in column A, the following would work:

=AND(TODAY()-A2>=91,TODAY()-A2<=98)

The result is either a True or False value, depending on the record date. You could then set up the filtering based on the value of the new column. (You can use AutoFilter for this purpose.) Only those records with a True in the column (those between 91 and 98 days old) would be displayed.

Tip #3306 applies to Microsoft Excel versions: 97 | 2000 | 2002 | 2003 | 2007


Save Time and Money! Many people need to keep track of employee time, but don't know where to start when it comes to creating a spreadsheet. Here's a way to save time, effort, and money with ready-to-use timesheet templates.
 
Check out Timesheet Templates today!

Helpful Links

Ask an Excel Question
Make a Comment

Tips.Net Home
Vital News Home

ExcelTips FAQ
ExcelTips Premium

Learn Access Now

Beauty Tips
Bugs and Pests Tips
Car Tips
Cleaning Tips
College Tips
Cooking Tips
Excel2007 Tips
ExcelTips
Family Tips
Gardening Tips
Health Tips
Home Tips
Money Tips
Organizing Tips
Pet Tips
Word2007 Tips
WordTips

Advertise on the
ExcelTips Site

 

Great Info!

Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your e-mail address and click "Subscribe."
     
(Your e-mail address will never be shared with anyone, ever.)