Conditional Formatting Date Ranges

LeighMacKay7

New Member
Joined
Oct 11, 2022
Messages
34
Office Version
  1. 365
  2. 2021
Platform
  1. Windows
  2. Web
Hi all,
I am hoping you can help me.

I have a number of dates displayed dd/mm/yyyy hh:mm, which I need to add some conditional formatting too the column.

What I would like, is a formula which includes =TODAY() and helps me with the following.

> Between todays date and 5 months ago = GREEN text
> Greater than 5 months ago and less than and equal to 6 months = AMBER text
> Greater than 6 months = RED text.
There is also a 4th option, which is text based and says "No Staff Information Form", which would need to be displayed in another colour text (maybe purple?)

I have messed about in Conditional Formatting and have had no joy.
New Formatting Rule > Use a formula to determine which cells to format.=DATEDIF(TODAY(),T2:T1000,”m”)<=5



I have watched a couple of videos but have been unsuccesful.

Any help/pointers would be greatly received.
 
Note that the formulas he used for the Conditional Formatting are similar to ones I showed in the post before.
But also pay close attention to my comments about what you want to do if they are EXACTLY equal to 5 or 6 months.
Which formulas you add the "=" to after the ">" or "<" will determine which rule they fall under.
So that needs to be given careful thought.
 
Upvote 0

Excel Facts

Is there a shortcut key for strikethrough?
Ctrl+S is used for Save. Ctrl+5 is used for Strikethrough. Why Ctrl+5? When you use hashmarks to count |||| is 4, strike through to mean 5.
It is just like I said.

Amber:
Excel Formula:
=AND(T2>EDATE(TODAY(),-6),T2<EDATE(TODAY(),-5))

Green:
Excel Formula:
=T2<EDATE(TODAY(),-6)

Note that you will need to decide what to do if it is EXACTLY 5 months or 6 months, and change some ">" to ">=" and/or "<" to "<=" where necessary.
Thank you. I can also use these for Amber and Green.
 
Upvote 0
Note that the formulas he used for the Conditional Formatting are similar to ones I showed in the post before.
But also pay close attention to my comments about what you want to do if they are EXACTLY equal to 5 or 6 months.
Which formulas you add the "=" to after the ">" or "<" will determine which rule they fall under.
So that needs to be given careful thought.
RED Conditional formatting = Anything greater than or equal to 6 months.
=T2<EDATE(TODAY(),-6)

AMBER Conditional formatting = Anything Greater than 5 months and less than 6 months.
=AND(T2>EDATE(TODAY(),-6),T2<EDATE(TODAY(),-5))

GREEN Conditional formatting = Anything less than 5 months.
=T2<EDATE(TODAY(),-5)
 
Upvote 0
RED Conditional formatting = Anything greater than or equal to 6 months.
=T2<EDATE(TODAY(),-6)

If that is the case, then you will need to make the following update, as I mentioned in my last two posts:
Rich (BB code):
=T2<=EDATE(TODAY(),-6)

Likewise, you will need to determine which rule you want EXACTLY equal to 5 months to fall under, and add an equal sign there too as well.
 
Upvote 0

Forum statistics

Threads
1,215,088
Messages
6,123,057
Members
449,091
Latest member
ikke

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