Conditional Formatting for service award

ninjapaping

New Member
Joined
Aug 6, 2024
Messages
8
Office Version
  1. 365
Platform
  1. Windows
hello! i have a column of dates the employees were hired. i want to format these when they reach 10 years as of today and every 5 years thereafter. what formula should i use in conditional formatting?
 

Attachments

  • Picture1.png
    Picture1.png
    6.8 KB · Views: 3

Excel Facts

Format cells as time
Select range and press Ctrl+Shift+2 to format cells as time. (Shift 2 is the @ sign).
Hello @ninjapaping
You did not mention what kind of format you were thinking of, so here is just one example with some additional helper cells:

1724279964333.png


TEST.xlsm
AB
1entry dateyears employed (5-year-cycle)
23-Jun-2013 
317-Aug-2009 
414-Jun-2018 
Sheet1
Cell Formulas
RangeFormula
B2:B4B2= ((YEAR(TODAY())-YEAR(A2))-MOD(YEAR(TODAY())-YEAR(A2), 5))/5
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B4Other TypeDataBarNO
 
Upvote 0
thanks for responding @PeteWright

but this is not what i want. i don't want to add another column. i just want to color the date if the employer reaches 10 years of service as of today and will color again every 5 years thereafter, that is 10yrs, 15yrs, 20 yrs and so on. will that be possible?
 
Upvote 0
Maybe something like...

Book1
A
203/06/2013
317/08/2009
414/06/2018
515/06/1999
616/06/2003
717/06/2018
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A7Expression=A2<=EDATE(TODAY(),-(12*25))textYES
A2:A7Expression=A2<=EDATE(TODAY(),-(12*20))textYES
A2:A7Expression=A2<=EDATE(TODAY(),-(12*15))textYES
A2:A7Expression=A2<=EDATE(TODAY(),-(12*10))textYES
 
Upvote 0
Maybe something like...

Book1
A
203/06/2013
317/08/2009
414/06/2018
515/06/1999
616/06/2003
717/06/2018
Sheet1
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A7Expression=A2<=EDATE(TODAY(),-(12*25))textYES
A2:A7Expression=A2<=EDATE(TODAY(),-(12*20))textYES
A2:A7Expression=A2<=EDATE(TODAY(),-(12*15))textYES
A2:A7Expression=A2<=EDATE(TODAY(),-(12*10))textYES
thanks for this input @MARK858

but to be more specific, i just want to color the text blue in bold format when that employee reach 10 years as of today and revert it to default formatting when it reaches 11 years. then format blue in bold text again when that employee reaches 15years of service, the in 20, 25, and so on. that is, if the length of service in years is not equal to 10, 15, 20 and so on, then the format should be in default. thanks.
 
Upvote 0
Formula for 10 years, change the 10 and 11 for each other category, format to suit.
Excel Formula:
=AND(A2<=EDATE(TODAY(),-(12*10)),A2>EDATE(TODAY(),-(12*11)))
 
Upvote 0
Formula for 10 years, change the 10 and 11 for each other category, format to suit.
Excel Formula:
=AND(A2<=EDATE(TODAY(),-(12*10)),A2>EDATE(TODAY(),-(12*11)))
it worked, but it covers all days between 10th to 11th year. let me request more, let's just focus on the year. that is todays year is 2024, i want to format all employees hired in 2014, 2009, 2004 and so on. thanks for your patience.
 
Upvote 0
That is a different question that I don't have time to look at for now, I'll look at it if no-one has replied after I finish work tonight
 
Upvote 0
Actually you could probably use something like
Excel Formula:
=YEAR(A2)=YEAR(TODAY())-10
and change the 10 for each category
 
Upvote 0
Actually you could probably use something like
Excel Formula:
=YEAR(A2)=YEAR(TODAY())-10
and change the 10 for each category
HAHA. I JUST FINISHED MODIFYING YOUR PREVIOUS FORMULA. AND I GOT WHAT I WANT
=AND((YEAR(L2)+10)=YEAR(TODAY()))
LOOKS THE SAME THOUGH. THANKS BUDDY.

JUST ONE LAST THING, CAN WE JUST COMBINE THIS TO INCLUDE ALL CATEGORIES 10, 15 , 20 ... IN JUST ONE FORMULA?
 
Upvote 0

Forum statistics

Threads
1,221,310
Messages
6,159,176
Members
451,543
Latest member
cesymcox

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