I'm trying to write some code to select a case based on an interval of time. For example, if the value in the cell is between 8:00 and 8:59, I want it to shade a certain color. However VBA does not like time formats in the case statement, at least the way I'm writing it.
Case 8:00:00 To 8:59:00
Selection.Interior.ColorIndex = 32
Does anyone have an idea on how to use time format in a case statement? Last resort I guess I can have it convert to a number format, do the case statements, then convert back to time format. Thanks!
Case 8:00:00 To 8:59:00
Selection.Interior.ColorIndex = 32
Does anyone have an idea on how to use time format in a case statement? Last resort I guess I can have it convert to a number format, do the case statements, then convert back to time format. Thanks!