Change colour of cell based on time

brodyfry

New Member
Joined
Apr 27, 2020
Messages
1
Office Version
  1. 365
Platform
  1. Windows
Hi

I would like to setup a table so that when I input a date the colour of the cell will change to yellow 5 months from that date, then orange 5 months and 2 weeks from that date, then finally red 6 months from the inputted date

Thanks
 

Excel Facts

How to change case of text in Excel?
Use =UPPER() for upper case, =LOWER() for lower case, and =PROPER() for proper case. PROPER won't capitalize second c in Mccartney
setup 3 conditional format rules with 3 formulas and use stop if true
Put them in this order
then you can use
RED fill
=Cell with date <= Date(Year(Today()),Month(today())-6,day(today()))
Orange fill
=Cell with date <= Date(Year(Today()),Month(today())-5,day(today())-14)
Yellow fill
=Cell with date <= Date(Year(Today()),Month(today())-5,day(today()))


Book5
A
1Date
28/31/19
310/30/19
411/27/19
511/13/19
6
Sheet1
Cell Formulas
RangeFormula
A2A2=TODAY()-240
A3A3=TODAY()-180
A4A4=DATE(YEAR(TODAY()),MONTH(TODAY())-5,DAY(TODAY()))
A5A5=DATE(YEAR(TODAY()),MONTH(TODAY())-5,DAY(TODAY()-14))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A2:A6Expression=AND(A2<>"",A2<=DATE(YEAR(TODAY()),MONTH(TODAY())-6,DAY(TODAY())))textYES
A2:A6Expression=AND(A2<>"",A2<=DATE(YEAR(TODAY()),MONTH(TODAY())-5,DAY(TODAY())-14))textYES
A2:A6Expression=AND(A2<>"",A2<=DATE(YEAR(TODAY()),MONTH(TODAY())-5,DAY(TODAY())))textYES
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,648
Messages
6,120,725
Members
448,987
Latest member
marion_davis

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