Conditional Format to turn Red if 5 yrs out, Yellow if 4 yrs out and green otherwise

Nlhicks

Active Member
Joined
Jan 8, 2021
Messages
264
Office Version
  1. 365
Platform
  1. Windows
With this formatting, I get the Green to show up but when I change the date in column B to Aug-2011, the red does not work and when I change it to the formula for yellow, all the cells change regardless of what one I am working on.



Arc Flash Tracking 2.xlsm
ABCDEFGHIJKLMN
1SubstationDate StickeredStickered ByDue DateField Comments
2BelfieldDec-04Could not label due to Construction project blocking access, still needs to be done
3BisbeeOct-23T. McCreadySep-28
4BismarckOct-22T. McCreadySep-27Model is 99% done, waiting on Fuse verification from NDMO, have email string in folder, needs labeled still
5Cambell CountyDec-04
6CarringtonDec-04
7Custer TrailDec-04
8DenbeighDec-04
9DevaulOct-22T. McCreadySep-27New Station service transformer to be install poss. 2024/25, new xfmr info is in folder in email string. No cell service at sub, very remote, verify location prior to driving out
10Devils LakeAug-22T. McCreadyJul-27
11EdgeleyMay-23T. McCreadyApr-28
12ElliotDec-04
13FargoMay-23T. McCreadyApr-28
NDMO
Cell Formulas
RangeFormula
D2:D13D2=DATE(YEAR(B2)+$P$2,MONTH(B2),DAY(Q2))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
D2:D33Expression=DATE(YEAR(B2),MONTH(B2),DayQ2)<YEAR(TODAY())-5textNO
D2:D33Expression=DATE(YEAR(B2),MONTH(B2),DAY(Q2)<=YEAR(TODAY())-5)textNO
Cells with Data Validation
CellAllowCriteria
A2:A13List=MyList2
 

Excel Facts

How to fill five years of quarters?
Type 1Q-2023 in a cell. Grab the fill handle and drag down or right. After 4Q-2023, Excel will jump to 1Q-2024. Dash can be any character.
you probably need STOP IF TRUE set
other wise anything less than or = 5 years will be green

what is green ay way , if = 5 years
in which case
=DATE(YEAR(B2),MONTH(B2),DAY(Q2)=YEAR(TODAY())-5)

formula wrong
=DATE(YEAR(B2),MONTH(B2),DAY(Q2))=YEAR(TODAY())-5)
and
=DATE(YEAR(B2),MONTH(B2),DayQ2)<YEAR(TODAY())-5
should be
=DATE(YEAR(B2),MONTH(B2),Day(Q2))<YEAR(TODAY())-5

also NO Q column in example

should that be Q or also B2????
 
Upvote 0
So it needs to be redone every 5 years. I am trying to signal to the person using the template that if it is in the yellow then it should be on the schedule for the next year and if it is red, they missed the deadline. I wouldn't mind coloring the whole line if that would make things simpler but I thought just coloring the due date would be okay.
 
Upvote 0
Arc Flash Tracking 2.xlsm
ABCDEF
1SubstationDate StickeredStickered ByDue Date
2BelfieldAug-11Jul-16
3BisbeeOct-23T. McCreadySep-28
4BismarckOct-22T. McCreadySep-27
5Cambell CountyDec-04
6CarringtonDec-04
NDMO
Cell Formulas
RangeFormula
D2:D6D2=DATE(YEAR(B2)+$P$2,MONTH(B2),DAY(Q2))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:D2Expression=DATE(YEAR(B2),MONTH(B2),DAY(Q2)=YEAR(TODAY())-5)textNO
D2:D33Expression=DATE(YEAR(B2),MONTH(B2),DAY(Q2)<=YEAR(TODAY())-5)textNO
Cells with Data Validation
CellAllowCriteria
A2:A6List=MyList2
 
Upvote 0
see more comments in my first post

the formulas are wrong , missing brackets
and
Q column is that correct

to format the whole row - you need to select the range
and then use a $ in the columns for conditional formatting

Yellow ?
I only see red and green

sorry
can you manually enter the colours you want on the sheet and also - why they are that colour , then i can help make a formatting rule for that
 
Upvote 0
I am only using the Q column because the DATE Formula requires a Day. I don't need to use a Day only Month and Year
 
Upvote 0
see more comments in my first post

the formulas are wrong , missing brackets
and
Q column is that correct

to format the whole row - you need to select the range
and then use a $ in the columns for conditional formatting

Yellow ?
I only see red and green

sorry
can you manually enter the colours you want on the sheet and also - why they are that colour , then i can help make a formatting rule for that
I did not get the yellow to work
 
Upvote 0
what are the conditions for
red
yellow
green
Date based on what column ?

i dont know whats in column Q - but if its the first , you can just put 1

=DATE(YEAR(B2),MONTH(B2),1)=YEAR(TODAY())-5)

as i mentioned
=DATE(YEAR(B2),MONTH(B2),DAY(Q2)=YEAR(TODAY())-5)
should be
=DATE(YEAR(B2),MONTH(B2),DAY(Q2))=YEAR(TODAY())-5)
and
=DATE(YEAR(B2),MONTH(B2),DAY(Q2))<=YEAR(TODAY())-5)

BUT you have = 5years
AND
<= 5years
so its always going to be true for the last formula and GREEN

so i dont know what you want for red, yellow , green

you also also comparing full date with year

i'm really confused sorry
 
Upvote 0
This is what I am looking for but I want the formulas to do it for me:

Arc Flash Tracking 2.xlsm
ABCDEFGHIJKLMN
1SubstationDate StickeredStickered ByDue DateField Comments
2BelfieldAug-11Aug-16Could not label due to Construction project blocking access, still needs to be done
3BisbeeOct-19T. McCreadySep-24
4BismarckOct-22T. McCreadySep-27Model is 99% done, waiting on Fuse verification from NDMO, have email string in folder, needs labeled still
5Cambell County 
6Carrington 
7Custer Trail 
8Denbeigh 
9DevaulOct-22T. McCreadySep-27New Station service transformer to be install poss. 2024/25, new xfmr info is in folder in email string. No cell service at sub, very remote, verify location prior to driving out
NDMO
Cell Formulas
RangeFormula
D2:D4D2=DATE(YEAR(B2)+$P$2,MONTH(B2),DAY(Q2))
D5:D9D5=IF(ISBLANK(B5),"",DATE(YEAR(B5)+$P$2,MONTH(B5),DAY(Q5)))
Cells with Data Validation
CellAllowCriteria
A2:A9List=MyList2
 
Upvote 0
Ok
so
as asked what are the rules for the colours and what date are we using ?

column D Due date
and
Red if 5 yrs out,
Yellow if 4 yrs out
and green otherwise

you have not include column P - so the XL2BB does not work when i copy it in to a spreadsheet

its maybe me, but i really am having trouble with your answers

can you explain in detail - WHY those colours

i dont know if we are comparing today dates or the difference in B and D

hopefully another member may pick up and understand , but i'm NOT - sorry
 
Upvote 0

Forum statistics

Threads
1,223,883
Messages
6,175,167
Members
452,615
Latest member
bogeys2birdies

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