Home > Software design >  Convert string to time in excel
Convert string to time in excel

Time:10-07

In my excel sheet I have a column with time. But the time is given in the following format.

1m 10.37s
2m 8.42s

I want to convert this to hh:mm:ss

Just can't figure out how.

Thank you for your help.

CodePudding user response:

You could try:

enter image description here

Formula in C1:

=--("0:"&SUBSTITUTE(LEFT(A1,FIND(".",A1)-1),"m ",":"))

Obviously cells have been numberformatted hh:mm:ss.


Edit:

=TIME(0,IFERROR(LEFT(A1,FIND("m",A1)-1),0),-LOOKUP(1,-MID(A1,FIND(" "," "&A1),ROW($1:$99))))
  • Related