Please Note: This article is written for users of the following Microsoft Excel versions: 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. If you are using an earlier version (Excel 2003 or earlier), this tip may not work for you. For a version of this tip written specifically for earlier versions of Excel, click here: Noting Inactivity within a Timeframe.

Noting Inactivity within a Timeframe

Written by Allen Wyatt (last updated February 28, 2024)
This tip applies to Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365


Graham is a lawyer with several hundred clients. He uses Excel to record time spent on client projects. In column A he notes the client, column B contains the date, column C the start time, and column D the end time. Graham would like to easily identify if he has not done anything for a client for more than three months from the current date.

There are a few ways you can accomplish this task, depending upon the characteristics of the data you are working with. If each client has a single line in the data table then you can use a simple conditional formatting rule to highlight those clients with record dates (column B) older than 90 days. Here's the formula you would use in the rule:

=(TODAY()-B2)>=90

The formula subtracts the date in B2 from today's date, which provides a number of days between the two dates. If it is greater than or equal to 90, then the formula is true, and your conditional format is applied.

This approach can be used if there are multiple records for each client, but it may not provide as clear-cut of an indicator as you might like. If you sort the records by client name, you can easily see which records from each client are over 90 days old. But you would then need to visually make a determination whether all the records for a given client are over 90 days so you can determine if you need to close out their account or not.

It may be better to use a different conditional formatting rule if your data table has multiple records per client. The following formula can be applied to all the clients in column A:

=AND(COUNTIF($A$2:$A2,$A2)=COUNTIF($A:$A,$A2),(TODAY()-B2)>=90)

It checks to see if the date is outside the desired 90 days, but it only does so if the current record is the last record for the client in the list.

ExcelTips is your source for cost-effective Microsoft Excel training. This tip (12890) applies to Microsoft Excel 2007, 2010, 2013, 2016, 2019, and Excel in Microsoft 365. You can find a version of this tip for the older menu interface of Excel here: Noting Inactivity within a Timeframe.

Author Bio

Allen Wyatt

With more than 50 non-fiction books and numerous magazine articles to his credit, Allen Wyatt is an internationally recognized author. He is president of Sharon Parq Associates, a computer and publishing services company. ...

MORE FROM ALLEN

Printing a Document's Mirror Image

If you need to print the mirror image (backwards) of a document, you may think you are out of luck in Word. There are ...

Discover More

Finding the Last-Used Cell in a Macro

Ever wonder what the macro-oriented equivalent of pressing Ctrl+End is? Here's the code and some caveats on using it.

Discover More

Widening Multiple Columns Proportionally

It is easy to adjust the width of columns in Excel. It is much harder to adjust the width of a range of columns ...

Discover More

Solve Real Business Problems Master business modeling and analysis techniques with Excel and transform data into bottom-line results. This hands-on, scenario-focused guide shows you how to use the latest Excel tools to integrate data from multiple tables. Check out Microsoft Excel 2013 Data Analysis and Business Modeling today!

More ExcelTips (ribbon)

Highlighting an Entire Row for the Current Date

It is easy to apply conditional formatting to a cell. What if you want an entire row to be formatted, however, based on ...

Discover More

Applying Conditional Formatting to Multiple Worksheets

If you just updated your copy of Excel, you may have noticed some differences in how the program handles applying ...

Discover More

Copying Conditional Formatting

Conditional formatting is a great feature in Excel. Here's how you can copy conditional formats from one cell to another ...

Discover More
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

View most recent newsletter.

Comments

If you would like to add an image to your comment (not an avatar, but an image to help in making the point of your comment), include the characters [{fig}] (all 7 characters, in the sequence shown) in your comment text. You’ll be prompted to upload your image when you submit the comment. Maximum image size is 6Mpixels. Images larger than 600px wide or 1000px tall will be reduced. Up to three images may be included in a comment. All images are subject to review. Commenting privileges may be curtailed if inappropriate images are posted.

What is 8 - 5?

There are currently no comments for this tip. (Be the first to leave your comment—just use the simple form above!)


This Site

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.

Newest Tips
Subscribe

FREE SERVICE: Get tips like this every week in ExcelTips, a free productivity newsletter. Enter your address and click "Subscribe."

(Your e-mail address is not shared with anyone, ever.)

View the most recent newsletter.