View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Pete[_26_] Pete[_26_] is offline
external usenet poster
 
Posts: 18
Default 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