A Time Format Problem

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I remember reading this on this or another Excel group, and now can not find
it. Please help

Column A and B contain Start and End time.
Column C calculates elapsed time =B2-A2
=B3-A3
etc
The sum total elapsed time at bottom of Column C
What I can not remember is the custom format to use in column C so that if
the end time goes past midnight, it calculates correctly.
Thanks for repeating the answer for me.

Paul
 
The custom format you need is:

[h]:mm:ss

this allows hours above 24 to be displayed, rather than wrapping.

Hope this helps.

Pete
 
Thanks, but that is not doing what I need.
I may have not explained correctly,
if start time is 11PM and end time is 2 am it should calculate to 3 hours,
but it is yielding negative (displaying ##########)
 
Try this formula:

For
A1: (StartTime)
B1: (EndTime)
C1: =MOD(B1-A1,1)
Format C1 as Category: Time, Type: 13:30:55 ( or Custom: h:mm:ss;@)

Does that help?
***********
Regards,
Ron

XL2002, WinXP
 
Thanks to every one. The problem was the formula
Using =(IF(A2>B2,B2+1-A2,B2-A2)) does the trick with the format [hh]:mm
 
Back
Top