use the current time to return a value
I assume your time is in cell A1 (change to suit). Enter the following
formula in cell G1:
= IF( OR(A1 23:00:00, A1 < 07:00:00), 3 ,IF( A1 15:00:00, 2, 1 ) )
(Spaces not really necessary - just easier to read)
Pete
|