time calculation 24 hour

pile-it Mark

Board Regular
Joined
Jan 10, 2006
Messages
125
hello!

i have a sheet for recording trips, yes the same sheet i have been playing with for 17 years.
P12 (formatted as text) is time (1109)
Q12 (formatted as text) is time (1207)
R12 (formatted as 13:30) is where i input the elapsed time. (0:58)
S12 (formatted as number 0.00 )has a formula that converts R12 to decimal (0:97)

P & Q are input as 24 hour UTC so the day shifts around 7pm. usually not an issue but it is possible p12 (2300) Q12 (0200) r12 (3:00). the length of time will not exceed 8 hours between P & Q,

after all these years i would like to make the calculation automatic.


Excel 2010
PQRS
11OFFONTOTALHOURS decimal
12110912070:580.97
13124514231:381.63
14203822121:331.55
15222123050:430.72
160.00
170.00
180.00
03 23 2018
Cell Formulas
RangeFormula
S12=IF((ISBLANK(H12))," ",HOUR(R12)+ROUND(MINUTE(R12)/60,2))
S13=IF((ISBLANK(G13))," ",HOUR(R13)+ROUND(MINUTE(R13)/60,2))
S14=IF((ISBLANK(H14))," ",HOUR(R14)+ROUND(MINUTE(R14)/60,2))
S15=IF((ISBLANK(H15))," ",HOUR(R15)+ROUND(MINUTE(R15)/60,2))
S16=IF((ISBLANK(H16))," ",HOUR(R16)+ROUND(MINUTE(R16)/60,2))
S17=IF((ISBLANK(H17))," ",HOUR(R17)+ROUND(MINUTE(R17)/60,2))
S18=IF((ISBLANK(H18))," ",HOUR(R18)+ROUND(MINUTE(R18)/60,2))



Excel 2010
PQRS
11OFFONTOTALHOURS decimal
12130515072:022.03
13232100521:311.52
140.00
150.00
02 01 2018
Cell Formulas
RangeFormula
S12=IF((ISBLANK(H12))," ",HOUR(R12)+ROUND(MINUTE(R12)/60,2))
S13=IF((ISBLANK(G13))," ",HOUR(R13)+ROUND(MINUTE(R13)/60,2))
S14=IF((ISBLANK(H14))," ",HOUR(R14)+ROUND(MINUTE(R14)/60,2))
S15=IF((ISBLANK(H15))," ",HOUR(R15)+ROUND(MINUTE(R15)/60,2))


thanks,
Mark
 

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)
the general form for an elapsed time calculation that crosses a date boundary, and so where end_time can be a smaller number than start_time (and there is no date value to help) is:

(end_time < start_time) + (end_time - start_time)

...let us know if you can't adapt to your data set up.
 
Upvote 0
date is E12 based on UTC at takeoff.

i can modify the sheet data and formatting to whatever it takes to make it work. it is a form i submit as a PDF to accounting
 
Last edited:
Upvote 0
shouldn't need to worry about the date - the formula I posted can cope without them.

Given your example data, does:

=(q12 < p12) + (q12 - p12)

...return the answers you expect?
 
Upvote 0

Forum statistics

Threads
1,224,823
Messages
6,181,182
Members
453,020
Latest member
Mohamed Magdi Tawfiq Emam

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top