Spreadsheet 123 Excel 2003/XP/2000/97: Highlight expired dates

Excel: Automatically highlight expired dates and dates that are 30 days from expiration in Excel 2003/XP/2000/97


Question:  In Excel 2003/XP/2000/97, is there a way to automatically highlight upcoming and past due dates?

For example, I have dates that certificates will expire in a spreadsheet. I would like Excel to highlight the ones that are 30 days from expiration in yellow and the ones that are past the expiration in red. Is that possible?


Answer:  Yes, you can use conditional formatting to achieve exactly what you are looking for.

First highlight the range of cells that you want to apply the formatting to. In this example, we've selected all of column A since we don't know how many rows will have expiration date values.


Next, under the Format menu, select Conditional Formatting.




When the Conditional Formatting window appears, select "Formula Is" in the drop down. Then enter the following formula:



=ISBLANK(A1)=TRUE



What this formula means is that if any cells in column A are blank, do not apply any formatting. The value of A1 is put in the IsBlank function since this is the first value in the range of cells that you've selected. Since the formula uses relative referencing each value in column A will be evaluated individually.


Next, click on the Add button to create a second condition.




In Condition 2, select "Cell Value Is" in the first drop down and "less than" in the second drop down. Then enter the following formula:



=NOW()


What this formula means is that if the date in the cell is past today's date, then apply the formatting in Condition 2.


Next, click on the Format button for Condition 2.




When the Format Cells window appears, select the Patterns tab. Then select the color that you'd like to see the expired dates displayed in. In this example, we've selected red. Then click on the OK button.




When you return to the Conditional Formatting window, you should see the following. Next, click on the Add button again to create a third condition.




For Condition3, select "equal to" in the second drop down. Then enter the following formula:



=NOW()+30


Then click on the Format button for Condition 3.




When the Format Cells window appears, select the Patterns tab. Then select the color that you'd like to see the dates that will expire in the next 30 days. In this example, we've selected yellow. Then click on the OK button.



Your Conditional Formatting window should now look like this:



Click on the OK button.


Now when you return to the spreadsheet, the conditional formatting will be applied.


Since we created this example on 20/09/2007, you can see that the value in cell A4 will expire in the next 30 days, while the value in cell A5 has already expired.


Suggested Reading

Spreadsheet News



Forum


Meet advanced users of MS Excel and Spreadsheet and do not be shy to ask your question.


Book Shop


Visit our busy book shop, were you can find latest books for beginners as well as advanced users of excel and similar programs.



Software Library




Excel & Spreadsheet Online Tutorials




Spreadsheet123
Home | About Us | Our Services | Software | Spreadsheets Library | Excel Tutorials | Useful Links | Site Map | Contact Us
Streamline.Net The home of good value web hosting
Home
About Us

Book Shop

Excel
Excel Tutorials
Financial Modeling
Excel Templates

Excel Tutorials

Excel Basic Tutorial
Excel Tech on Net
MS Excel Tutorials and Projects
MS Excel Spreadsheet Tutorial
How to Decide What Chart Type to Use
How To Merge Cells in Excel
Excel - Printing Effectively from Excel
Using Excel Functions and Creating Formulas

Spreadsheets Library

Corporate finance spreadsheets
Valuation Inputs Spreadsheets
Big-picture valuation spreadsheets
Focused valuation spreadsheets
Financial Service firms
Troubled firms
Private companies
Young and high-growth firms
Multiples
Valuation in Acquisitions
Valuation of other assets
Value Enhancement Spreadsheets
Basic option pricing models
Real option models in corporate finance
Real option models in valuation
Hotel & Restaurant Management Spreadsheets
Real Estate & Mortgage Excel Spreadsheets
Excel Personal Budget Spreadsheets
More Spreadsheets

Software Library

Accounting Software
Small Business Software
Tax Calculating Software
Auditing Software
Excel Add-Ins
Property Management Software
Payroll Software
Spreadsheet Software

Contact Us
Useful Links
Our Services
Site Map