View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.worksheet.functions
Trevor Shuttleworth Trevor Shuttleworth is offline
external usenet poster
 
Posts: 1,089
Default Change Military time on Imported Cell

One way:

if the data starts in cell A1, put this formula in cell B1 (or any free
cell)

=TIME(IF(LEN(A1)=6,LEFT(A1,2),LEFT(A1,1)),IF(LEN(A 1)=6,MID(A1,3,2),MID(A1,2,2)),RIGHT(A1,2))

format as h:mm:ss and drag down

Regards

Trevor


"JS" wrote in message
...
I have imported data into excel and one column contains the military time.
It is displayed as below. How can I insert a ":" for the entire column in
the correct place. I have not been able to do it through Format-Cells
menu.

160526 16:05:26
90928 9:09:28
92155 9:21:55
110101 11:01:01

Thanks,
JS