Conditional Formating change colour based on how many days left before cell Date

natpolyc

New Member
Joined
May 13, 2015
Messages
2
Hello!

I am using the forum some time now but just registered because I tried some suggestions already posted but no luck :(
I have a column in Excel 2013 with certificate Due Dates:

If the certificate overdue: Red
If the certificate expires in 90 days/ 3 months form today: Yellow (for those 3 months until expiry)
If the certificate expires in more than 90 days: Green (for those 9 months until expiry)

(I don't mind about the "=" in the dates can be in any of the above stages)

Maybe the issue is the order that I have place in Conditional Formatting although or the "Stop if true" I have tried several.

Thank you so much for your kind assistance.

Natalia
 

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.
Try these three rules applied to your whole range:


'For overdue:
Code:
=H2-today()<0  '(formatted to red)
'for 3 months to expiry:
Code:
=IF(AND((H2-TODAY())>0),((H2-TODAY())<91)) '(formatted to yellow)
'for more than 90 days:
Code:
=H2-TODAY()>91  '(formatted to green)

Of course... your cell reference is going to be different. Change H2 to the first date to be looked at in the range.
 
Last edited:
Upvote 0
Try these three rules applied to your whole range:


'For overdue:
Code:
=H2-today()<0  '(formatted to red)
'for 3 months to expiry:
Code:
=IF(AND((H2-TODAY())>0),((H2-TODAY())<91)) '(formatted to yellow)
'for more than 90 days:
Code:
=H2-TODAY()>91  '(formatted to green)

Of course... your cell reference is going to be different. Change H2 to the first date to be looked at in the range.

Thank you very much for the prompt reply.
It worked. I changed the order of the conditions to check first the red, then the green and finally the yellow.

Thanks again!
 
Upvote 0

Forum statistics

Threads
1,214,918
Messages
6,122,249
Members
449,075
Latest member
staticfluids

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