Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hello-
I am trying to update a cell with text (time of day) based on the time the report is actually run. The report runs at roughly 15 past the hour 3 times a day, but I dont want the report to show the actual time but rather the "top of the hour" time as shown in the code. The code doesnt work though, any ideas? Range("A2").Select If Time < TimeSerial(11, 30, 0) Then Range("A2").Select ActiveCell.FormulaR1C1 = "11:00" ElseIf Time < TimeSerial(2, 30, 0) Then Range("A2").Select ActiveCell.FormulaR1C1 = "2:00" ElseIf Time < TimeSerial(5, 30, 0) Then Range("A2").Select ActiveCell.FormulaR1C1 = "5:00" End If |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
If statement to compare time cell to a time | Excel Worksheet Functions | |||
Comparing 2 files on date/time stamp, and based time difference do a subroutine | Excel Programming | |||
IF statement to calculate time usage in specific time bands | Excel Worksheet Functions | |||
IF statement for time based data | Excel Worksheet Functions | |||
Using an IF statement on time based data | Excel Discussion (Misc queries) |