Formula for red, yellow, green formatting

midcoastchris04

New Member
Joined
Jul 7, 2020
Messages
10
Office Version
  1. 365
Platform
  1. Windows
  2. MacOS
Hey Friends!

I am trying to recreate a formula I had at a prior job that color codes tasks (red, yellow, or green) based on age. For the dates below, I need anything 24 hrs or older from "now" to be red. Anything within 4 hrs of hitting the "red" to be yellow, and anything else to be green. Any help is greatly appreciated!

10/27/2020 8:51
10/27/2020 9:37
10/27/2020 11:21
10/27/2020 11:31
10/27/2020 11:51
 

Excel Facts

Easy bullets in Excel
If you have a numeric keypad, press Alt+7 on numeric keypad to type a bullet in Excel.
you would need 3 rules in conditional formatting - BUT the colour will not change with the spreadsheet just left open as it needs a calc to re evaluate the conditional formatting
If you need it to change live when open , then you will need VBA

Book1
ABC
1Colour
210/28/20 10:51green
310/27/20 9:37RED
410/27/20 11:21RED
510/28/20 11:31green
610/29/20 11:51green
710/27/20 16:44yellow
Sheet4
Cell Formulas
RangeFormula
A7A7=NOW()-TIME(21,0,0)
C2:C7C2=IF(A2<NOW()-1,"RED",IF(A2<NOW()-TIME(20,0,0),"yellow","green"))
Cells with Conditional Formatting
CellConditionCell FormatStop If True
A:AExpression=AND(A1<>"",A1>NOW()-TIME(20,0,0))textYES
A:AExpression=AND(A1<>"",A1<=NOW()-1)textYES
A:AExpression=AND(A1<>"",A1<=NOW()-TIME(20,0,0))textYES
 
Upvote 0

Forum statistics

Threads
1,214,813
Messages
6,121,705
Members
449,048
Latest member
81jamesacct

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