View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.misc
David Biddulph David Biddulph is offline
external usenet poster
 
Posts: 618
Default USING THE NESTED IF FUNCTION TO SEE IF A TIME DATE VALUE IS T OR F

You have been incnsistent as to where you drew your boundaries in some
cases, but try
=IF(HOUR(A1)<7,"midnite",IF(HOUR(A1)<12,"morning", IF(HOUR(A1)<17,"afternoon",IF(HOUR(A1)<19,"Evening ","Night"))))
--
David Biddulph

"gunnerpatt" wrote in message
...
If time is between 7am and 11am = morning
If time is between 12pm and 5 pm = afternoon
If time is 5pm and < 7pm = Evening
If time is between 7pm and 11pm = Night
If time is between 12am and 6am = midnite

I am having trouble getting the time component of the "DATE TIME" 6/02/03
12:21 AM - to be evaluated by the formula.
Any help would be greatly appreciated

Thanks