Conditional Formatting based on dates.

rusty21

New Member
Joined
Dec 31, 2012
Messages
37
Hi All,

I have a spreadsheet to monitor when peoples legal documents are due for renewal. In cell D2-X2 I have the date that the current documentation expires. I want to format the cell so that if the current expiry date is past today it goes red, if todays date is within 2 months of the expiry date I want it to go Orange and anything outside of the 2 above I want green.

Any ideas please?

Regards
Rusty
 

Excel Facts

Excel Can Read to You
Customize Quick Access Toolbar. From All Commands, add Speak Cells or Speak Cells on Enter to QAT. Select cells. Press Speak Cells.
Multiple conditional formatting rules, using the formula options:

Formula for red condition:
Excel Formula:
=D2>TODAY()

Formula for orange condition:
Excel Formula:
=AND((TODAY()-D2)>0,(TODAY()-D2)<=60)

Formula for green condition:
Excel Formula:
=(TODAY()-D2)>60
 
Upvote 0
Hello! Will this suit you?
Book1.xlsm
DEF
219.10.202410.09.202419.07.2024
Sheet10
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2Expression=(TODAY()-F2)>60textNO
E2Expression=AND((TODAY()-E2)>0;(TODAY()-E2)<=60)textNO
D2Expression=D2=TODAY()textNO
 
Upvote 0
Hello! Will this suit you?
Book1.xlsm
DEF
219.10.202410.09.202419.07.2024
Sheet10
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F2Expression=(TODAY()-F2)>60textNO
E2Expression=AND((TODAY()-E2)>0;(TODAY()-E2)<=60)textNO
D2Expression=D2=TODAY()textNO
Thank you for the reply, but that is the same as I was given in the previous response and just keeps it red.

Regards
Rusty
 
Upvote 0
It would be easier if you provided a piece of your data as is and as needed. I think in this case the help would be productive.
 
Upvote 0
It would also be helpful if you tested if your dates are real dates or are actually text.
Does the formula below return TRUE or FALSE.

Excel Formula:
=ISNUMBER(D2)
 
Upvote 0
It returns TRUE.
With that result then we definitely need to see your actual data, preferably posted either using XL2BB or by uploading the actual file (data sanitized if needed) to a file hosting site like www.dropbox.com or www.box.com (remember to mark it for sharing and post the link it provides).

My take on it is to format manually all the cells as green (I see no need for a condition for this) then apply the rules below

Book1
DEFGHIJKLMNOPQRSTUVWX
219/10/202410/09/202419/07/202402/09/202405/11/202404/10/202411/08/202423/07/202403/09/202425/08/202412/09/202415/08/202409/10/202405/11/202420/08/202402/10/202429/08/202413/08/202413/08/202414/08/202424/10/2024
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:X2Expression=AND((TODAY()-D2)>0,D2>=EDATE(TODAY(),-2))textNO
D2:X2Expression=D2>=TODAY()textNO
 
Last edited:
Upvote 0

Forum statistics

Threads
1,222,780
Messages
6,168,185
Members
452,170
Latest member
Hailee994

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top