Format and convert hours to Minutes

samitnair

Board Regular
Joined
Jul 5, 2010
Messages
155
Hello

I have a column A1 (Time) which has the following data and since it does not have similar formatting I am finding it difficult to convert it into minutes. Any help would be appreciated.

TimeMinutes
1d 3h 42m1662
18h 38m 1118
34m 34
7h 5m 425

<tbody>
</tbody>

Regards
Samit Nair
 

Excel Facts

What did Pito Salas invent?
Pito Salas, working for Lotus, popularized what would become to be pivot tables. It was released as Lotus Improv in 1989.
In column A .. is ONE DAY

1d or 1d 0h 0m

Does column A contain TEXT or time formatted values ?
 
Last edited:
Upvote 0
Code:
=ROUND(1440*(IFERROR(LEFT(A2,FIND("d",A2)-1),0)
 + IF(ISNUMBER(SEARCH("h",A2)),
   SUBSTITUTE(SUBSTITUTE(SUBSTITUTE(IFERROR(MID(A2,SEARCH("d",A2)+1,LEN(A2)),A2),"h",":"),"m","")," ",""),
   "0:" & SUBSTITUTE(IFERROR(MID(A2,SEARCH("d",A2)+1,LEN(A2)),A2),"m",""))), 0)

Also test with:
23d
12h
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,520
Messages
6,120,013
Members
448,935
Latest member
ijat

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