You are here:

Excel/Conditional format based on date


I want to create a conditional format for a cell. This cell will have a date in it that is referenced from a cell in a different sheet in the workbook
One sheet 1I have dates that people took a test.  This information will be referenced by a cell in sheet 2.  The cell in sheet 2 needs a conditional format that changes the cell to black if one year (or more) has passed from the referenced date, change to red if 330 days have passed from the referenced date, change to orange if 300 days have passed from the referenced date and have no color if there is 299 days or less since the referenced date.

In simple terms the formulas are


where sheet2!A1 represents the date - but in your case, that probably needs extending to be a lookup formula to get the date per person.  Formulas would need to be entered in this order, and there is no formatting needed for the 4th condition as cell would remain clear in that event.

I hope this works as you need it to - I've been SLIGHTLY lazy with the year formula and gone with 365 days, which is technically wrong - I'm not sure how accurate you need this to be - you may need to replace this with the yearfrac formula for example if you want 100% accuracy.
About Excel
This topic answers questions related to Microsoft Excel spreadsheet (or workbook) stand-alone or Mircrosoft Office Excel including Excel 2003, Excel 2007, Office 2000, and Office XP. You can get Excel help on Excel formulas(or functions), Excell macros, charting in Excel, advanced features, and the general use of Excel. This does not provide a general Excel tutorial nor the basics of using a spreadsheet. It provides specific answers to using Microsoft Excel only. If you do not see your Excel question answered in this area then please ask an Excel question here


All Answers

Answers by Expert:

Ask Experts


Aidan Heritage


I have provided first hand support since `95 for Microsoft Office majoring in Word and Excel - support for all versions from 2 onwards. I'm based in the UK, so please allow for time differences when asking me questions from other parts of the world!


My background is in the insurance industry and call centre areas, but have been called upon to provide many varied solutions.

I'm educated to UK A level standard, but as I left school some 30 years ago that is rather irrelevent - university of life has provided more of a background!

©2017 All rights reserved.