View Single Post
  #8   Report Post  
Posted to microsoft.public.excel.worksheet.functions
David Biddulph[_2_] David Biddulph[_2_] is offline
external usenet poster
 
Posts: 8,651
Default If I am within the time specified..?

In that case, only the 2nd *is* true, so your formula seems to be doing the
job (but doesn't give the values you show in your 3rd column).
If you are having problems, check that your times are all true Excel times
and not text, and that they don't also include date data (because your
formula assumes that they don't). Format the times temporarily as General
or Number and check whether any are greater than 1, as 12:00 is 0.5 of a day
and 23:59 is nearly 1.

The situation is different from what I had guessed from your earlier
incomplete description to which I tried to reply. I assume now that A is
your start time and B your finish time, and that these might span midnight.?
--
David Biddulph

Kashyap wrote:
17:30 3:30 TRUE 4:46
18:00 5:00 TRUE 4:46
16:30 3:30 TRUE 4:46
11:30 22:30 FALSE 4:46

=IF(B2<A2,OR(A2<D2,B2D2),AND(A2<D2,B2D2))

in the above case, only 2nd should be true..