I can retrieve values from our database at work that represent coordinates. I use SQL to retrieve the data and open the results in Excel. They're stored to appear as coordinates in the degrees format, e.g. DDMMSS for LAT and DDDMMSS for LONG. 

The excel sheet is created with two columns labeled LAT and LONG. However the values are formatted as General and so Excel treats them as string. e.g. 987654 for LAT and 9876543 for LONG

I need the data as time values to perform Great Circle Distance calculations as described here:

<http://www.cpearson.com/excel/LatLong.aspx>

I manage to convert the string values to Time values by using:

```
=TIME(VALUE(MID(A1,1,2)),VALUE(MID(A1,3,2)),VALUE(MID(A1,5,2)))

```

However the HH values are not maintained.

e.g. 544039 becomes 06:40:39

The 54 becomes an 06 because 54/24 = 2.25 and 0.25\*24 = 6

BUT I need to maintain it as 54 not 06. 

I believe Excel calls it "Elapsed Time" in the following format:

```
[hh]:mm:ss 

```

How can I properly convert 544039 from a string value, to an Elapsed Time value; 54:40:39?

Any help would be appreciated. I'm open to running VB scripts if needed.