View Single Post
  #9   Report Post  
Posted to microsoft.public.excel.misc
Imbecile90 Imbecile90 is offline
external usenet poster
 
Posts: 9
Default If Functions Time

Fred,
We're so close...but if A1 = 11:30 PM and a B1 = 1:00 AM, I would need C1 to
be "Early by 1:30" instead it's "Late by 22:30." It's like my "day" STARTS at
about 7:00 PM and ENDS at about 8:00 AM. Thank you so much.

"Fred Smith" wrote:

Try this:
=IF(A1=B1,"On Time",IF(ABS(B1-A1)<0.5,IF(A1<B1,"Early by
"&TEXT(B1-A1,"h:mm"),"Late by "&TEXT(A1-B1,"h:mm")),IF(A1+1<B1,"Early by
"&TEXT(B1-A1-1,"h:mm"),"Late by "&TEXT(A1+1-B1,"h:mm"))))

Regards,
Fred.

"Imbecile90" wrote in message
...
Adding a date is the most logical solution, but it's not practical in my
case. Is there a way I could create a custom 24 hour clock somehow? Sorry
to
be a pain.

"Imbecile90" wrote:

You're right, Buddy. If A1 = 12:15 AM AND B1 = 11:30 PM...I would need C1
to
be "Late By 45 mins" and instead it's "Early by 23:15"

Shift would be 8 PM - 8 AM

"Billy Liddel" wrote:

The trouble is that although they may be on the same shift, they are
not on
the same day. 12:15 AM is just 15 minutes and this is lower than 22:00
(10:00
pm)

If 00:15 is in A1 this is lower than 22:00 just as 21:30 (9:39 PM)

By the way, what times does the shift cover? I do not know if this
makes any
difference.