Conditional Formatting for service award

ninjapaping

New Member
Joined
Aug 6, 2024
Messages
11
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

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.
The AND in
Excel Formula:
=AND((YEAR(L2)+10)=YEAR(TODAY()))
or the OR in
Excel Formula:
=OR((YEAR(L2)+10)=YEAR(TODAY()))
do nothing as there isn't a 2nd criteria

If you mean you are using the OR for multiple tests of the dates then yes that works if you are using the same format for each test
Excel Formula:
=OR(YEAR(L2)=YEAR(TODAY())-10,YEAR(L2)=YEAR(TODAY())-15,YEAR(L2)=YEAR(TODAY())-20,YEAR(L2)=YEAR(TODAY())-25)
 
Last edited:
Upvote 0
Solution
The AND in
Excel Formula:
=AND((YEAR(L2)+10)=YEAR(TODAY()))
or the OR in
Excel Formula:
=OR((YEAR(L2)+10)=YEAR(TODAY()))
do nothing as there isn't a 2nd criteria

If you mean you are using the OR for multiple tests of the dates then yes that works if you are using the same format for each test
Excel Formula:
=OR(YEAR(L2)=YEAR(TODAY())-10,YEAR(L2)=YEAR(TODAY())-15,YEAR(L2)=YEAR(TODAY())-20,YEAR(L2)=YEAR(TODAY())-25)
Yes, that's exactly it. Thanks!
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,181
Members
453,022
Latest member
Mohamed Magdi Tawfiq Emam

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