Need Conditional Formatting Formula to Change the Highlight to Red if today is more than 5 years past sticker date and yellow if it is 4 years past

Nlhicks

Active Member
Joined
Jan 8, 2021
Messages
264
Office Version
  1. 365
Platform
  1. Windows
Arc Flash Tracking 2.xlsm
ABCDEFGHIJKLMN
1SubstationDate StickeredStickered ByDue DateField Comments
2Bole2026G.Giant2031Gotta love those veggies
3Circle2024N. Hicks2029
4Conrad2024N. Hicks2029
5Crossover2018Blaster2023
6Custer2027R. Red2032Grapefruits are good
7Dawson County2024N. Hicks2029Updated model, there were lots of errors on this model.
8Fairview West2024N. Hicks2029
MMO
Cell Formulas
RangeFormula
D2:D8D2=IF(ISBLANK(B2),"",B2+5)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:D30Cell Value>TODAY()textNO
D2:D30Cell Valuebetween B2 and TODAY()+1460textNO
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
It appears that column B and D are not dates at all, but rather they are numbers (specifically, the year number).
So you would not use date math of them. If you want to compare those years to the current year (whatever it may be), then use this formula:
Excel Formula:
YEAR(TODAY())
to get the year number of the current year.

Then you can use that in your Conditional Formatting calculations.
 
Upvote 1
date stickered is NOT a date just a numbere for the year
and PAST i'm assuming the only year (date) that applies is 2018 in you example

you can use 2 formulas
=AND(B2<>"",B2<YEAR(TODAY())-5 (more than 5 years) RED , im assuming you mean 5 or more if so then
=And(B2<>"",B2<=YEAR(TODAY())-5 )
=B2=YEAR(TODAY())-4) (4 years) YELLOW



Book3
ABCDEFGHIJKLMN
2Bole2026G.Giant2031Gotta love those veggies
3Circle2024N. Hicks2029
4Conrad2024N. Hicks2029
5Crossover2018Blaster2023
6Custer2027R. Red2032Grapefruits are good
7Dawson County2024N. Hicks2029Updated model, there were lots of errors on this model.
8Fairview West2024N. Hicks2029
9
102022
112021
122020
132019
142018
152017
162016
172015
182014
Sheet1
Cell Formulas
RangeFormula
D2:D8D2=IF(ISBLANK(B2),"",B2+5)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
B2:B31Expression=AND(B2<>"", B2=YEAR(TODAY())-4)textNO
B2:B31Expression=AND(B2<>"",B2<=YEAR(TODAY())-5)textNO
 
Upvote 0
You are welcome.
Glad we were able to help!
 
Upvote 0
I actually need it to be Column D that gets the Highlighted value not Column B
 
Upvote 0
Column B was the last time it was done but when it is past due as in Column D then it should be red and if it is within the final year it should be yellow but otherwise green
 
Upvote 0
so all the dates in column D are in the future
can you give more examples and colours required
Column B was the last time it was done but when it is past due as in Column D then it should be red
when what is past due, column B ?
and if it is within the final year it should be yellow but otherwise green
So yellow is NOT 4 years .
within final year ??? means what exactly ,
again, some examples of expected results would help

you maybe able to modify based on the formulas i posted

so for RED in my example above
=AND(B2<>"",B2<YEAR(TODAY())-5)

for 2007, 2010 , 2013 , 2016 , 2019 or 365 Subscription excel version
Conditional Formatting

Highlight applicable range >>
B2:B10000 - Change, reduce or extend the rows to meet your data range of rows, - WILL highlight COLUMN B range

Home Tab >> Styles >> Conditional Formatting
New Rule >> Use a formula to determine which cells to format
Edit the Rule Description: Format values where this formula is true:
=AND(B2<>"",B2<YEAR(TODAY())-5)

Format [Number, Font, Border, Fill]
choose the format you would like to apply when the condition is true
OK >> OK

which mean that the cells in column B will turn RED , IF the value in B is less than 5 years from todays year
 
Upvote 0
If you look at the 4th number it is past due


Arc Flash Tracking 2.xlsm
ABCDE
1SubstationDate StickeredStickered ByDue Date
2Bole2026G.Giant2031
3Circle2024N. Hicks2029
4Conrad2024N. Hicks2029
5Crossover2018Blaster2023
6Custer2027R. Red2032
7Dawson County2024N. Hicks2029
MMO
Cell Formulas
RangeFormula
D2:D7D2=IF(ISBLANK(B2),"",B2+5)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:D30Cell Value>TODAY()textNO
D2:D30Cell Valuebetween B2 and TODAY()+1460textNO
 
Upvote 0

Forum statistics

Threads
1,224,813
Messages
6,181,109
Members
453,021
Latest member
Justyna P

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