View Single Post
 
Old 01-21-2019, 12:33 AM
ArviLaanemets ArviLaanemets is offline Windows 8 Office 2016
Expert
 
Join Date: May 2017
Posts: 873
ArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud ofArviLaanemets has much to be proud of
Default

The easiest way is to enter the time string (in Military Time format) as text, and calculate the time value in another column (formatted as Military Time format too, or in any other Time format you prefer).

E.g. Column A has header MTSring in A1, is formatted as text, and has e.g. the value 0615 entered into cell A2. Jou have another column e.g. B with header TimeValue in B2, formatted with some Time format of your choice. Into B2, enter the formula like
Code:
=TIME(MID($A2,1,2),MID($A2,3,2);0)
and copy the formula down for entire table.

User enters the time string into column MTString. In all calculations, the time is read from column TimeValue. To avoid the confusion, you can even hide the column TimeValue from user. (Of-course you also can omit the column TimeValue at all, and simply calculate the time value directly from Military Time string in column MTString in your formulas.)
Reply With Quote