Conditional formatting for expired dates and for 2 months before expiry date of course

mipasodu

New Member
Joined
Sep 29, 2022
Messages
6
Office Version
  1. 365
Platform
  1. Windows
Hi, I have a sheet detailing each employees list of trainings that they have taken, some courses run for 12 months, 24 months, 36 months or only need to be taken once. I have validity period of each course, title of course, employee name.

I want conditional formatting to highlight any course that has expired. I would also like to highlight any course that will expire within 2 months. Course that are only taken once don't need to highlight.

VALIDITY PERIOD (Months) >1236Once24
TeamNameInformationSafetySecurityConduct
5Bill Gates26.10.202312.5.202226.10.2023
5Bob Doorpost7.9.202228.3.202218.8.2021
 

Excel Facts

Highlight Duplicates
Home, Conditional Formatting, Highlight Cells, Duplicate records, OK to add pink formatting to any duplicates in selected range.
is that formatted as a date - or is it text - cant tell from the post
also what does
Course that are only taken once don't need to highlight.
Mean ???

if you right click on a date and format
change to general - do you now see a number

because of the format and justification , it looks like text
need to be dates

all your dates are expired or will do within 2 months
i added a 2024 date

used this formula in conditional formatting
=AND(C3<>"",C3<DATE(YEAR(TODAY()),MONTH(TODAY())+2,DAY(TODAY())))

Book7
ABCDEF
1VALIDITY PERIOD (Months) >1236Once24
2TeamNameInformationSafetySecurityConduct
35Bill Gates10/26/235/12/2210/26/23
45Bob Doorpost9/7/222/1/243/28/228/18/21
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C3:F4Expression=AND(C3<>"",C3<DATE(YEAR(TODAY()),MONTH(TODAY())+2,DAY(TODAY())))textYES
 
Upvote 0
Hi, they are all formatted as dates.

In B1:F1 of my example the validity of 36 months so it should show as expired on 26th October 2026.

I would like the CF to take the "course completion date" in C3:F4, check the period of validity in cells B1:F1 and then deduct 2 months and mark the cell in red
 
Upvote 0
is that formatted as a date - or is it text - cant tell from the post
also what does

Mean ???

if you right click on a date and format
change to general - do you now see a number

because of the format and justification , it looks like text
need to be dates

all your dates are expired or will do within 2 months
i added a 2024 date

used this formula in conditional formatting
=AND(C3<>"",C3<DATE(YEAR(TODAY()),MONTH(TODAY())+2,DAY(TODAY())))

Book7
ABCDEF
1VALIDITY PERIOD (Months) >1236Once24
2TeamNameInformationSafetySecurityConduct
35Bill Gates10/26/235/12/2210/26/23
45Bob Doorpost9/7/222/1/243/28/228/18/21
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
C3:F4Expression=AND(C3<>"",C3<DATE(YEAR(TODAY()),MONTH(TODAY())+2,DAY(TODAY())))textYES
in my example the validity of the course is given in months, 12, 24, 36 or "Once" (which means that it never expires, or only needs to be taken once.
 
Upvote 0

Forum statistics

Threads
1,215,071
Messages
6,122,963
Members
449,094
Latest member
Anshu121

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