convert minutes to mth:dd:hh:mm problem

song0311

New Member
Joined
Mar 10, 2024
Messages
4
Office Version
  1. 365
Platform
  1. Windows
Hi there Excel SMEs,

I am working on a project that requires me to convert time in minutes to mth:dd:hh:mm format. I've tried using the format function - custom with mm:d:hh:mm, however, the numbers don't add up. For example, for 145325 minutes, I should have 3mth:10:22:05, however excel returned it as 04:09:22:05. What did I do wrong or how can I rectify this?
 

Excel Facts

Repeat Last Command
Pressing F4 adds dollar signs when editing a formula. When not editing, F4 repeats last command.
145325 is recognized in excel as a data value November 18th, 2297.
You have divided this value by 1440. That gives you 100.9201389. 100 as date in Excel is 9th of April, 1900. That's the 4th month. So your format is correct.
The remainder (0.9201389) is a time value that excel recognizes as 22:05:00. Again the format works as to be expected and is correct.
I guess you want to see the value as something like 3.3640 months. I have no clue, yet.
 
Upvote 0
You could try this format "mm/dd hh:mm:ss" that is 04/09 22:05:00.
From =145325/24/60
Hi DJunqueira, thanks for your suggestion. I tried and got what you indicated. However, that does not address the issue of 145325 min does not equate to 4 months +, it's actually 3 months 10days +. As what GraH has mentioned above, the system doesn't seem to recognise that. And that is the challenge I'm trying to overcome currently
 
Upvote 0
Hi, welcome to the forum!
For example, for 145325 minutes, I should have 3mth:10:22:05
You could try something like this:
Book2
AB
11453253mth:10:22:05:00
Sheet1
Cell Formulas
RangeFormula
B1B1=LET(D,A1/60/24,INT(D/30)&"mth:"&INT(MOD(D,30))&":"&TEXT(MOD(MOD(D,30),10),"HH:MM:SS"))
 
Upvote 1
Solution
Hi, welcome to the forum!

You could try something like this:
Book2
AB
11453253mth:10:22:05:00
Sheet1
Cell Formulas
RangeFormula
B1B1=LET(D,A1/60/24,INT(D/30)&"mth:"&INT(MOD(D,30))&":"&TEXT(MOD(MOD(D,30),10),"HH:MM:SS"))
OMG, this is exactly what i needed! i don't actually need the seconds bit, so can i just remove ":SS" portion without affecting the formula?
 
Upvote 0
so can i just remove ":SS" portion without affecting the formula?
Yes, absolutely, although I just noticed that I wrongly hard coded one of the values in the TEXT() part of the formula, you should use this version.

Excel Formula:
=LET(D,A1/60/24,INT(D/30)&"mth:"&INT(MOD(D,30))&":"&TEXT(MOD(MOD(D,30),INT(MOD(D,30))),"HH:MM"))
 
Upvote 1
Mr.Djunqueira for only my knowledge, i use your formula but is giving the attached error:-
1713783265547.png
 

Attachments

  • let prob.JPG
    let prob.JPG
    27.4 KB · Views: 5
Upvote 0

Forum statistics

Threads
1,223,240
Messages
6,170,951
Members
452,368
Latest member
jayp2104

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