View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
JE McGimpsey JE McGimpsey is offline
external usenet poster
 
Posts: 4,624
Default Difference between times. Start time: 11:30PM End time: 5 AM

Since XL stores times as fractional days, you can add 1 day if the span
crosses midnight. One way is to check if the end time is less than the
beginning time and use the fact that XL converts TRUE to 1 and FALSE to
0:

A1: 11:30PM
B1: 5:00AM
C1: =B1 - A1 + (B1<A1)


An alternative:

C1: =MOD(B1-A1,1)


In either case, format C1 as a time.

In article ,
Surrey wrote:

I need to calculate the difference between times. The tricky part is that the
start time is: 11:30PM and end time is: 5:00AM. Thanks for your help!