View Single Post
  #5   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Fred Smith[_4_] Fred Smith[_4_] is offline
external usenet poster
 
Posts: 2,389
Default Time Value Between Two Times

1. First, your format needs to be: hh:mm AM/PM (Excel doesn't use zeros for
time format, because it wouldn't know whether you wanted hours and minutes
or minutes and seconds.)
2. Second, Excel doesn't recognize 8:30 as a time. Your choices a
IF(AND(F85=time(8,30,0),F85<=time(9,0,0),1,"B")
IF(AND(F85=timevalue("8:30"),F85<=timevalue("9:00 "),1,"B")
IF(AND(F85=--"8:30",F85<=--"9:00"),1,"B")

Regards,
Fred

"Debbie" wrote in message
...
Here is another scenario.

If F85 is greater than or equal to 8:30 am but less than or equal to
9:00 am, then I need it to return a 1, If it is not between 8:30 am
and 9:00 am then I need it to return "B". I have the cell formated as
time 00:00 AM. What am I doing wrong?

IF(AND(F85=8:30,F85<=9:00),1,"B")