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

Pivot Table Drill Down
Double-click any number in a pivot table to create a new report showing all detail rows that make up that number
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
 
Upvote 0

Forum statistics

Threads
1,213,534
Messages
6,114,184
Members
448,554
Latest member
Gleisner2

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
Back
Top