Format Cell When time is Past

rskip

New Member
Joined
Nov 26, 2009
Messages
38
Office Version
  1. 365
Platform
  1. Windows
I have a cell for current time (C4) (Pressing F9 to refresh, and a list of times, 01:00, 02:00, 03:00 etc.(C10, C11, C12) I want to turn the the cells with a static time (01:00, 02:00 etc) red when the time passes, I have conditional formatted the cells C10, C11, C12 with =C10<C4 (RED) etc. However they do not turn Red. In Google sheets this works, however not in excel.
Thoughts on what is wrong?
Thanks
 

Excel Facts

Can Excel fill bagel flavors?
You can teach Excel a new custom list. Type the list in cells, File, Options, Advanced, Edit Custom Lists, Import, OK
try VBA to update time in real time
in worksheet module (Right click on sheet name/ view code):
VBA Code:
Option Explicit
Private Sub Worksheet_Activate()
getTime
End Sub

and module:
(Alt-F11 then insert module)
VBA Code:
Option Explicit
Sub getTime()
Dim t As Double
Application.ScreenUpdating = False
t = TimeValue(Now())
Range("C4").Value = t
Application.OnTime t + TimeValue("00:00:01"), "getTime" ' Change to suitable duration, i.e, 1 minute: Timevalue("00:01:00")
Application.ScreenUpdating = True
End Sub

Code starts to run from sheet activate
 
Upvote 0
Thanks, and will add to get auto updating. However my problem is the cells I format, when I manually update the time, will not change to the formatted color.
 
Upvote 0

Forum statistics

Threads
1,214,644
Messages
6,120,709
Members
448,983
Latest member
Joaquim_Baptista

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