Using Conditional Formatting with expired dates

Mustafa Evans

New Member
Joined
Mar 18, 2010
Messages
35
Office Version
  1. 2010
Platform
  1. Windows
Hi all, hope you can help am attempting to use conditional formatting to show expired and near expired (5 days) dates in my spreadsheet.

For expired dated i would like those cells to be RED.
For dates about to expire in the next 5 days those cells should be AMBER
and finally, those cells that are not about to expire should remain WHITE.

Am trying to use the TODAY() function in my calculations. Hope you can help.

The dates are in columns H, I and J, but begin in cell H8.

RED - =H8<=TODAY()
AMBER - =H8>=TODAY()-5
WHITE - =H8>TODAY()

Having done this am unsure what order they should run. Or is there a easier way.

Many thanks.
 

Excel Facts

Ambidextrous Undo
Undo last command with Ctrl+Z or Alt+Backspace. If you use the Undo icon in the QAT, open the drop-down arrow to undo up to 100 steps.
I would change the amber to
Excel Formula:
H8<=Today()+5
and get rid of the rule for white.
 
Upvote 0
Hi, sorry your suggestion doesn't seem to work, could you have another look at it please.

Many thanks.
AMBER Rule - Dates expiring in 5 days.pngCF Screen.pngRED Rule - Expired dates.pngSheet.png
 
Upvote 0
You need to remove the quotes from the amber formula.
 
Upvote 0
Thanks, i thought i have deleted those already !!. I works now except i had to re-order the order they work with RED first followed by AMBER.
 
Upvote 0
You're welcome & thanks for the feedback.
 
Upvote 0
My protocol in CF is now working for dates, but i have another element regarding whether an appointment is Urgent or Routine. I've also managed to get this working. BUT when i combine them the conditional formatting clash and the result isn't what i need. I wonder if you could help further please.

Am not sure why the formula works as seems very untidy. The date element is OK, i just need to combine now.

So, the appointment type (Routine or Urgent) is selected in column G:

If ROUTINE is selected in cell G8, cell H8 is GREYED out (and ideally that cell is locked)
If URGENT, is selected in cell G8, then H8 will accept a date (entered manually) and cells I8 and J8 and GREYED out (and ideally those cells locks)
Working GREY Protocol.png

CF for Protocol GREY.png
 
Upvote 0
You cannot lock cells with conditional formatting.

Those rules seem to be working, so what's the problem.
 
Upvote 0
The Grey CF rules work, and in a different spreadsheet the date rules work, but they don't work when put together in the same spreadsheet.
CF combined not working.png
CF Screen.png
 
Upvote 0
If G is Urgent should I & J still show red/amber, or should they remain grey?
 
Upvote 0

Forum statistics

Threads
1,214,599
Messages
6,120,449
Members
448,966
Latest member
DannyC96

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