Conditional Formatting with Dates

nhays9010

New Member
Joined
Apr 3, 2018
Messages
4
I have a training spreadsheet that I am tracking 16 different trainings for about 30 people.

I have the dates the training was complete out next to their names. All of the training is annual, so I would like to have the colors change as the exp date approaches.

If training was completed 1Jan18, up to 300 days after, I would like to keep green. At 301-350, changed to yellow, and 351+ would be red.
 

Excel Facts

How can you automate Excel?
Press Alt+F11 from Windows Excel to open the Visual Basic for Applications (VBA) editor.
For red use
Code:
=(TODAY()-$B$2)>=351

For green use. Make sure Stop if True is checked in the rules manager and it is above the yellow rule
Code:
=(TODAY()-$B$2)<=300

For yellow use
Code:
=(TODAY()-$B$2)<=350
 
Upvote 0
Now that the formatting is correct, how do I copy this rule to the other 115 cells I need to track without pulling the rule from the original cell?
 
Upvote 0
First you need to select all 116 cells you want the rules applied to. Then open conditional formatting and create those rules in the order Scott T suggested. Depending on the layout of your cells, change the cell reference like so:

If they are all in a single column, use this cell reference in each rule: $B2
If they are in multiple rows and columns, use this cell reference of the top left cell in the selected range: B2

The use of $ is important here.
 
Upvote 0
Understood, my range is from D2-S33. So would my rule change to "=(TODAY()-D2:S33)<=300"

First you need to select all 116 cells you want the rules applied to. Then open conditional formatting and create those rules in the order Scott T suggested. Depending on the layout of your cells, change the cell reference like so:

If they are all in a single column, use this cell reference in each rule: $B2
If they are in multiple rows and columns, use this cell reference of the top left cell in the selected range: B2

The use of $ is important here.
 
Upvote 0
No. The rule would change to:

"=(TODAY()-D2)<=300"

Excel conditional formatting is smart about the cell references and updates them per cell as if you manually dragged the formula across the sheet.
 
Upvote 0
Alright, I think I got it now. Time for tomorrow to tell me if I'm a liar or not. So 300 days minus today would have been 7Jun17. That cell is still green. When I come into the office tomorrow, that 7Jun17 cell should be yellow, and my 8Jun17 cell should still be green. Hopefully I am getting all this straight.

Thanks for all the assistance guys!

No. The rule would change to:

"=(TODAY()-D2)<=300"

Excel conditional formatting is smart about the cell references and updates them per cell as if you manually dragged the formula across the sheet.
 
Upvote 0
I have a training spreadsheet that I am tracking 16 different trainings for about 30 people.

I have the dates the training was complete out next to their names. All of the training is annual, so I would like to have the colors change as the exp date approaches.

If training was completed 1Jan18, up to 300 days after, I would like to keep green. At 301-350, changed to yellow, and 351+ would be red.

Hi!

Try the suggestion below:

1) Select the range D2:S33 (with D2 - active cell).

2) Create de Conditional Formatting (Formula)

=(D2<"1/jan"+351)*(D2>"1/jan"+300) - color Yellow

=D2<"1/jan"+301 - color Green

=D2>"1/Jan"+350 - color Red

3) Finally, click Ok.

I hope this helps.

Markmzz
 
Upvote 0

Forum statistics

Threads
1,215,985
Messages
6,128,114
Members
449,422
Latest member
noor fatima

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