I have assumed
- that the CF needs to continually update.
- that you want to highlight a cell if it is within 40 minutes (before or after) the current time
- that the sheet in question is named "Times"
If that is so, then I would put the formula =MOD(NOW(),1) in a vacant cell in the 'Times' sheet. I used cell J1.
Select from A2 to F100 and apply the CF formula =ABS($J$1-A2)<=1/36
In the ThisWorkbook module in the vba window
VBA Code:
Private Sub Workbook_Open()
Recalc_Times_Sheet
End Sub
In a standard module in vba
VBA Code:
Sub Recalc_Times_Sheet()
Application.OnTime Now + TimeValue("00:00:10"), "Recalc_Times_Sheet"
ThisWorkbook.Sheets("Times").Calculate
End Sub
Save, close and reopen the workbook. The current time and the CF should now update every minute.
Test with a
copy of your workbook.