Adding Time????

A

au1080

I am trying to add times (hh:mm) together to get a total hours/minutes
worked.
For example:
Time Start: 0800
Time End : 1530
Total Hours: 7.5

Please help.
I have looked at prior posts and I cannot find this answer. I found the
post with the link, but the link did not help either. I have also searched
everywhere. I am just hoping for an answer.
Thanks
au1080
 
B

bpeltzer

What's the format of the input (start/end) times? Is someone just typing the
numbers, '0800' and '1530'? If so, you'd have to tease out the hh and mm
components. If the start and end were in A1 and A2, the minutes elapsed is
=(60*(INT(A2/100)-INT(A1/100))+MOD(A2,100)-MOD(A1,100)). If the end time
could be the next morning, tack on +IF(A2<A1,1440,0).
Toonvert that to a time, divide the result by 1440 and apply formatting:
Format > Cells, select the Number tab and the custom category, and type h:mm.
(If the inputs are provided as times -- 8:00 and 15:30 -- you could just
subtract: =a2-a1)
 
A

au1080

Outstanding,
THANK YOU!

bpeltzer said:
What's the format of the input (start/end) times? Is someone just typing the
numbers, '0800' and '1530'? If so, you'd have to tease out the hh and mm
components. If the start and end were in A1 and A2, the minutes elapsed is
=(60*(INT(A2/100)-INT(A1/100))+MOD(A2,100)-MOD(A1,100)). If the end time
could be the next morning, tack on +IF(A2<A1,1440,0).
Toonvert that to a time, divide the result by 1440 and apply formatting:
Format > Cells, select the Number tab and the custom category, and type h:mm.
(If the inputs are provided as times -- 8:00 and 15:30 -- you could just
subtract: =a2-a1)
 
Top