Convert Unconventional D:H:M Counter to Total Minutes

jkerekgyarto

New Member
Joined
Jan 5, 2021
Messages
5
Office Version
  1. 365
Platform
  1. Windows
I need to convert these cells that contain elapsed time in the format shown, to total minutes.

The data in the cell is texts and numbers – there is a space on both sides of each number.

The formula is a Value function with a nested Find – it’s not working for me, however.

=VALUE(LEFT(A2,FIND("D",A2)-2))*24*60 + VALUE(LEFT(A2,FIND("D",A2)-3))*24*60 + VALUE(MID(A2,FIND(":",A2)+2,FIND("H",A2)-2))*60 + VALUE(LEFT(A2,FIND("M",A2)-2))

The position of the characters in the cells is not static – see the difference between A2 and A3.

Image of cells in spreadsheet is uploaded.

Any help is very appreciated.
 

Attachments

  • Screenshot 2021-01-05 151313.png
    Screenshot 2021-01-05 151313.png
    5.2 KB · Views: 10
Welcome to the MrExcel board!

Do you have the LET function in your Excel 365?

21 01 06.xlsm
AB
1StatusTotal Minutes
2DOWN for 7 D : 13 H : 8 M10868
3Sector for 12 D : 2 H : 16 M17416
DHM
Cell Formulas
RangeFormula
B2:B3B2=LET(lng,RIGHT(SUBSTITUTE(A2," ",REPT(" ",20)),160),LEFT(lng,20)*1440+MID(lng,60,20)*60+MID(lng,120,20))
 
Upvote 0

Excel Facts

Whats the difference between CONCAT and CONCATENATE?
The newer CONCAT function can reference a range of cells. =CONCATENATE(A1,A2,A3,A4,A5) becomes =CONCAT(A1:A5)

Forum statistics

Threads
1,214,397
Messages
6,119,273
Members
448,883
Latest member
fyfe54

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