![]() |
Substacting two military times
I would like to be able to substract entry of two military times and come up with the difference in Hours and tenths of an hour. Example 0945-0800 = 145 converted to 1.75 hours.
|
Substacting two military times
Hi Jake!
If you have your calculations in the form shown: =(TIME(LEFT(A13,2),MID(A13,3,2),0)-TIME(MID(A13,6,2),RIGHT(A13,2),0))* 24 The Time functions use the syntax TIME(Hour, Minute, Second) The text parsing functions LEFT, MID and RIGHT are extracting the arguments for the TIME function The result has to be multiplied by 24 since Excel treats time as a decimal part of 1 day. If you have your times in different cells you should be able to adapt the above. For Excel's handling of time generally see: http://www.cpearson.com/excel/datetime.htm#TOC -- Regards Norman Harker MVP (Excel) Sydney, Australia Excel and Word Function Lists (Classifications, Syntax and Arguments) available free to good homes. "Jake Swarty" wrote in message ... I would like to be able to substract entry of two military times and come up with the difference in Hours and tenths of an hour. Example 0945-0800 = 145 converted to 1.75 hours. |
Substacting two military times
On Mon, 15 Dec 2003 14:21:08 -0800, "Jake Swarty" wrote:
I would like to be able to substract entry of two military times and come up with the difference in Hours and tenths of an hour. Example 0945-0800 = 145 converted to 1.75 hours. With 0800 in A1 and 0945 in A2: =DOLLARDE(A2/100,60) - DOLLARDE(A1/100,60) If the DOLLARDE function is not available, and returns the #NAME? error, install and load the Analysis ToolPak add-in. --ron |
All times are GMT +1. The time now is 12:47 AM. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com