Written by Allen Wyatt (last updated December 18, 2021)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and 2021
Bill has a data table with fifty columns and many, many rows. 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. All you need to do is set up the filter so that only those records with a True in the column (those between 91 and 98 days old) would be displayed.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (10997) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and 2021. You can find a version of this tip for the older menu interface of Excel here: Filtering to a Date Range in the Past.
Comprehensive VBA Guide Visual Basic for Applications (VBA) is the language used for writing macros in all Office programs. This complete guide shows both professionals and novices how to master VBA in order to customize the entire Office suite for their needs. Check out Mastering VBA for Office 2010 today!
Filtering your data is a very power capability in Excel. What, however, are the limits on how many rows you can filter? ...
Discover MoreWhen you are working with large amounts of data in a worksheet, filtering that data can make the process much simpler. ...
Discover MoreWhen you use Excel to input and store information, you need to be concerned with whether the information meets your ...
Discover MoreFREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)
Got a version of Excel that uses the ribbon interface (Excel 2007 or later)? This site is for you! If you use an earlier version of Excel, visit our ExcelTips site focusing on the menu interface.
FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."
Copyright © 2025 Sharon Parq Associates, Inc.
Comments