Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win


Conditional formatting in Excel for dates older than 2 weeks

Posted on 2011-09-16
Medium Priority
Last Modified: 2012-05-12
Hi, i have an Excel document that is used to record dates that of maintenance, backups etc.
I would like to apply conditional formatting to cells that contain a date that is older than then the "Todays" date by 2 weeks plus by highlighting those cells in a different colour.
I can see an option where you can manually enter "Format cells that are Greater than date", but i dont want to have to keep manually changing this date, i guess there is an option for it to look at the PC's current date and highlight any cell that is older by more than 2 weeks
Question by:Rick_Penney
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 3
  • 2
LVL 50
ID: 36548184

if A1 has a date, then select A1 and create a conditional format with New Rule > Use a Formula to determine ...

Enter this formula


Select a format and hit OK.

cheers, teylyn
LVL 50
ID: 36548189
If A2 and below also have dates, you can then copy A1 and use Paste Special > Formats to copy the same format to the cells below. Since the conditional formula contains a relative reference, the next row down will check A2, the next one A3, and so on.

cheers, teylyn
LVL 19

Accepted Solution

Arno Koster earned 1000 total points
ID: 36548216
Standard conditional formatting date options are :

today / yesterday / tomorrow
last 7 days
previous week / this week / next week
previous month / this month / next month

this does not fit the 2 weeks so a different approach is needed : using a formula.
you could use the formula

= (A1 < Today() - 14)

assuming that the dates are placed in column A. Otherwise, replace A1 with the first cell in the selection containing the dates.
Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!


Author Comment

ID: 36548251
many thanks to both of you for your quick replies and help, sorry teylyn , i couldn't get your formula to work, i wasn't adding any spaces so maybe that was why.
Thank you akoster, your formula works perfectly. is it possible to apply this to multiple cells in one go rather than doing this for each cell individually?
thank you
LVL 50

Assisted Solution

by:Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE) earned 1000 total points
ID: 36548283
The difference between akoster's formula and mine is the operator after today()

You said

>>  "Todays" date by 2 weeks plus

So I assumed "today plus two weeks"


akoster interpreted it as "today minus two weeks"

= (A1 < Today() - 14)

The brackets and the spaces do not make a difference.

A clear definition of what you want to compare A1 with would have.


Author Comment

ID: 36548311
ok, thanks for the explanation, i did put (contain a date that is older than), anyway,
i'll increase the points to 500 and split it between you.
hope thats ok

Author Closing Comment

ID: 36548318
Many thanks for the speed of your help
LVL 19

Expert Comment

by:Arno Koster
ID: 36548390
You're welcome...

You can select the complete column A (or a range from A1 to let's say A22), select conditional formatting, enter the formula, and the complete selection will be conditionally formatted on each different cell.

So it's not like the whole column will be colored when cell A1 changes to a date in last year.


Featured Post

Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This article describes how you can use Custom Document Properties to store settings and other information in your workbook so that they will be available the next time you open the workbook.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial will demonstrate how to use a scrolling table in Microsoft Excel using the INDEX function.

604 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question