Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / Worksheet Functions / August 2006

Tip: Looking for answers? Try searching our database.

formula to calculate time difference crossing midnight

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ditorejax - 17 Aug 2006 15:16 GMT
In Excel I have been trying to find an easier way to calculate a time
difference where the times cross midnight.  Example:
Start time:  23:50:00
End time:  00:15:00

How would you formulate an equation to determine the duration of time or
differnce between the start and end time?
Richard Buttrey - 17 Aug 2006 16:08 GMT
>In Excel I have been trying to find an easier way to calculate a time
>difference where the times cross midnight.  Example:
[quoted text clipped - 3 lines]
>How would you formulate an equation to determine the duration of time or
>differnce between the start and end time?

One way which results in hours and decimal of an hour is

=IF((end-start)<0,(end-start)*24+24,(end-start)*24)

If you want to see  hours and minutes you'd need to modify it to pick
up the decimal fraction and multiply it by 60.

HTH

__
Richard Buttrey
Grappenhall, Cheshire, UK
__________________________
Marcelo - 17 Aug 2006 16:11 GMT
Hi,

one way is add 1 in 00:15:00

assuming that 23:50:00 is on A2 and 00:15:00 is on A3
=a3+1-a2

=00:25:00

hth
Signature

regards from Brazil
Thanks in advance for your feedback.
Marcelo

> In Excel I have been trying to find an easier way to calculate a time
> difference where the times cross midnight.  Example:
[quoted text clipped - 3 lines]
> How would you formulate an equation to determine the duration of time or
> differnce between the start and end time?
Sloth - 17 Aug 2006 16:46 GMT
=(A2>A3)+A3-A2

1 only needs to be added if A2>A3 otherwise you get 24 extra hours when
times don't go over midnight.  You will see the problem when you start
summing the times and if you format as [h]:mm:ss

> Hi,
>
[quoted text clipped - 14 lines]
> > How would you formulate an equation to determine the duration of time or
> > differnce between the start and end time?
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.