Conditional format based on time

Fegal

Board Regular
Joined
Feb 2, 2013
Messages
101
Office Version
  1. 365
Platform
  1. Windows
Hi All

I need to highlight F9 if the current time is less than 1 hour before F9.
hope that makes sense!

Fatigue 1.xlsx
BCDEF
3OP NAME
4CURRENT DATECURRENT TIME
524/03/202420:12
6
7End of rest pre deploymentDeployed
8Deployed membersDate & Time Date & TimePre-deployment wake time17 Hour limit
9123/03/2024 8:00 AM23/03/2024 6:00 PM1024/03/2024 1:00 AM
Sheet1
Cell Formulas
RangeFormula
B5B5=TODAY()
C5C5=NOW()
E9E9=TEXT(D9-C9,"[H]")
F9F9=IF(C9="","",C9+17/24)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F9Expression=HOUR(F9)=HOUR(NOW)textNO
 

Excel Facts

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
Actually ill just extend it out so the format clears if I9 has a time in it

Fatigue 1.xlsx
BCDEFGHI
8Deployed membersDate & Time Date & TimePre-deployment wake time17 Hour limitDate & Time
9123/03/2024 8:00 AM23/03/2024 6:00 PM1024/03/2024 1:00 AM724/03/2024 1:00 AM
102 
Sheet1
Cell Formulas
RangeFormula
E9E9=TEXT(D9-C9,"[H]")
G9G9=TEXT(I9-D9,"[h]")
F9:F10F9=IF(C9="","",C9+17/24)
Cells with Conditional Formatting
CellConditionCell FormatStop If True
F9Expression=HOUR(F9)=HOUR(NOW)textNO
 
Upvote 0

Forum statistics

Threads
1,223,900
Messages
6,175,276
Members
452,629
Latest member
SahilPolekar

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