Hello Ade,
You need to use string functions to break the time code apart since this a non-standard Excel format for time.
VBA Example:
Dim H, M, S
Dim TimeCode As String
TimeCode = "105306"
H = Left(TimeCode, 2) & ":"
M = Mid(TimeCode,3, 2) & ":"
S = Right(TimeCode, 2)
Range("A1") = H & M & S
A1 will display 10:53:06
There are equivalent Worksheet Functions to do this also.
Worksheet Formula Example:
A1 = 105306
B1 contains the formula =LEFT(A1, 2) & ":" & MID(A1, 3, 2) & ":" & RIGHT(A1, 2)
B1 will display 10:53:06
Sincerely,
Leith Ross
Bookmarks