View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
T. Valko T. Valko is offline
external usenet poster
 
Posts: 15,768
Default Time Value Between Two Times

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

Try it like this:

=IF(AND(F85=TIME(8,30,0),F85<=TIME(9,0,0)),1,"B")

Or, use cells to hold the time boundaries...

A1 = 8:30 AM
B1 = 9:00 AM

=IF(AND(F85=A1,F85<=B1),1,"B")

You probably want to format the result as General.

--
Biff
Microsoft Excel MVP


"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")