1h 20m 30s Time format problem

CWEED

New Member
Joined
Oct 13, 2006
Messages
2
I have a spreadsheet that comes with 1h 20m 30s in a column named downtime. I am trying to convert the format to 00:00:00 but am not having much luck. I have tried text to coulmns to remove the h,m or s but I run into issues because if the time is less than an hour it doesnt have the h, or if its on seconds it will be displayed as 56s for exmaple.

Any help would be greatly appreciated.

Thanks


Examples:

Downtime
1m 14s
3m 48s
1h 24m 50s
7s
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Oaktree

MrExcel MVP
Joined
Jun 20, 2002
Messages
8,010
Office Version
  1. 365
Welcome to the board.

Try:

Code:
=(IF(ISNUMBER(SEARCH("h",A1)),"","0:")&IF(ISNUMBER(SEARCH("m",A1)),"","0:")&SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(A1,"h ",":"),"m ",":"),"s",""))+0

formatted as hh:mm:ss
 

CWEED

New Member
Joined
Oct 13, 2006
Messages
2
That did it!

Thanks for your help. I might not go bald after all...
 

Forum statistics

Threads
1,136,650
Messages
5,677,000
Members
419,667
Latest member
MegEri

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top