View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
joeu2004[_2_] joeu2004[_2_] is offline
external usenet poster
 
Posts: 829
Default check if or not time lies between a time interval

Jaspreet281 wrote:
i have different entry times with me and i want to
know whether they were between 10 pm to 7 am,


"Jaspreet281" wrote:
my target cell is in this format 11/5/2011 9:48:46 AM
and its a 24hrs format.


=IF(OR(HOUR(A1)<=7,22<=HOUR(A1)),"between","not between")

Change "<=" to "<" if you do not want to include 10pm and 7am.