Alerts About Approaching Due Dates
Please Note: This article is written for users of the following Microsoft Excel versions: 97, 2000, 2002, and 2003. If you are using a later version (Excel 2007 or later), this tip may not work for you. For a version of this tip written specifically for later versions of Excel, click here: Alerts About Approaching Due Dates.
Jonathan developed a worksheet that tracks due dates for various departmental documents. He wondered if there was a way for Excel to somehow alert him if the due date for a particular document was approaching.
There are several ways that this can be done in Excel, and you should pick the method that is best for your purposes. The first method is to simply add a column to your worksheet that will be used for the alert. Assuming your due date is in column F, you could place the following type of formula in column G:
The formula checks to see if the date in cell F3 is earlier than a week from today. If so, then the formula displays "<<<" in the cell. The effect of this formula is to alert you to any date that is either past or within the next week.
Another approach is to use the conditional formatting capabilities of Excel. Follow these steps:
- Select the cells that contain the document due dates.
- Choose Conditional Formatting from the Format menu. Excel displays the Conditional Formatting dialog box.
- Make sure the first drop-down list is "Cell Value Is." (This should be the default.) (See Figure 1.)
Figure 1. The Conditional Formatting dialog box.
- Make sure the second drop-down list is "Less Than."
- In the formula area, enter "=TODAY()" (without the quote marks).
- Click the Format button. Excel displays the Format Cells dialog box. (See Figure 2.)
Figure 2. The Format Cells dialog box.
- Using the Color drop-down list, choose the color red.
- Click OK to close the Format Cells dialog box.
- Click Add. The Conditional Format dialog box expands to include a second condition.
- Make sure the first drop-down list for the second condition is "Cell Value Is." (This should be the default.)
- Make sure the second drop-down list is "Less Than."
- In the formula area, enter "=TODAY()+7" (without the quote marks).
- Click the Format button. Excel displays the Format Cells dialog box.
- Using the Color drop-down list, choose the color blue.
- Click OK to close the Format Cells dialog box. (See Figure 3.)
Figure 3. The finished Conditional Formatting dialog box.
- Click OK to close the Conditional Formatting dialog box.
This is a two-tiered format, and you end up with two levels of alert. If the due date is already past, then it shows up as red. If the due date is today or within the next seven days, then it shows up in blue.
ExcelTips is your source for cost-effective Microsoft Excel training. This tip (3179) applies to Microsoft Excel 97, 2000, 2002, and 2003. You can find a version of this tip for the ribbon interface of Excel (Excel 2007 and later) here: Alerts About Approaching Due Dates.
Program Successfully in Excel! John Walkenbach's name is synonymous with excellence in deciphering complex technical topics. With this comprehensive guide, "Mr. Spreadsheet" shows how to maximize your Excel experience using professional spreadsheet application development tips from his own personal bookshelf. Check out Excel 2013 Power Programming with VBA today!
Comments for this tip:
Barry 26 Mar 2015, 06:22
What you want is quite easy, assuming your expiry date is in column M
The term "M3>=TODAY()" makes the AND function false if the expiry date is passed, the other term L3<>"" remove the highlight if there is no date in L3.
Clare 25 Mar 2015, 07:23
Hi I am hoping the first =IF(L$3<(TODAY()+14),"<<<","")
will work, can I add an expired date to this also?
Barry 24 Mar 2015, 06:07
I do this on several spreadsheets that I use for keeping tabs on unpaid invoices.
First of all, select the range of data that this will be applicable to, then select the top leftmost cell(if you have a header row then this will be cell A2). In the Conditional Formatting dialogue box use the drop down on the "Cell Value is" and select "Formula Is".
Assuming the due date is in column H and the Date Paid is in column I then put the following formula in the formula box:
set the formatting that you want if the due date is past, and click OK.
If the top leftmost cell is say A3 then the formula would be =AND($H3<today(),$H3<>"",$I3="")
The secret is in the terms in the AND function the first ($H2<Today()) determines if the date is past due, the second term ($H2<>"") prevents the highlight if the due date is blank, and the the third term ($I2="") takes the highlight off as soon as you enter the Date Paid into the cell (it actually tests for a blank cell so anything in the cell will remove the highlight).
The "$" signs in the formula allow you to conditionally format the whole row but each cell is still testing the same columns, so the whole row will be lighted not just the Date cells.
In my spreadsheets I have usually a second condition which turns the crow red if the Date Due is 30days overdue (use the term $H2+30<today(). This needs to be the first condition to override any other condition set.
Clare 23 Mar 2015, 08:19
What I am trying to do is have a column highlighted when a due date is approaching & past. The due date I have is in another cell.
This is a warning to me when I need to chase items that are late or overdue.
I would then like to be able to add my approval date in the column and the cell then not be highlighted.
hoping you can help!
Marc T. 13 Mar 2015, 12:07
Thank you this is exactly what I was looking for.
Marie C. 10 Mar 2015, 14:58
As an Excel newbie, I really appreciate your tips and tricks. I was having trouble constructing a due date formula and after carefully following your step by step guide I identified the issue. I am so grateful for you taking the time to share your knowledge and expertise! Sincerely, Marie C.
Leave your own comment: