Convert decimal value into time

Minx_Minxy

New Member
Joined
Jul 13, 2015
Messages
16
Office Version
  1. 365
Platform
  1. Windows
Hi guys is me again. I have another problem. I'm getting an average of some values and I need to convert them into time as in dd:hh:mm.

Here is an example:
AverageDays & Hours
0.56
4.76
1.94
0.06
0.26
2.52

<colgroup><col span="2"></colgroup><tbody>
</tbody>

In column Days and hours: 0.56 should show 13h 36min and 4.76 should show 4days 18h 24min and so on.

How do I do it?

Thanks in advance
 

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
.56 x 24 = 13.44 int(13.44) = 13

60 x .44 = 26.44 minutes int (26.44) = 26

int(1.94) = 1
1.94 - int(1.94) = .94
.94 x 24 as before
 
Upvote 0
.56 x 24 = 13.44 int(13.44) = 13

60 x .44 = 26.44 minutes int (26.44) = 26

int(1.94) = 1
1.94 - int(1.94) = .94
.94 x 24 as before


Thanks oldbrewer, how do I enter it in the corresponding cell? Is this the formula?
 
Upvote 0
17.6417 days 15 hours 21 minutes
=INT(A1)&" days "&INT((A1-INT(A1))*24)&" hours "&INT(((A1-INT(A1))*24-INT((A1-INT(A1))*24))*60)&" minutes"

<colgroup><col><col><col span="8"></colgroup><tbody>
</tbody>
 
Upvote 0
Your abbreviations were not consistent, so I spelled everything out (you can abbreviate whatever you want however you want it on your own)...

=IF(A2>1,INT(A2)&"days ","")&TEXT(MOD(A2,1),"h""hours"" m""minutes""")
 
Upvote 0
Your abbreviations were not consistent, so I spelled everything out (you can abbreviate whatever you want however you want it on your own)...

=IF(A2>1,INT(A2)&"days ","")&TEXT(MOD(A2,1),"h""hours"" m""minutes""")

Thank you so much! it worked a treat ?
 
Upvote 0
I was hoping you do it just with formatting.
Like format as " d "days" h "hours" m "minutes" "
Which works for less than 32 days
4.76 yields "4 days 18 hours 14 minutes"
After 32 days, though its a new month and days begins at zero again. Will not accept [d] for extended number of days like [h] for hours. :(
A tempting solution, but know its limitations.
Rick's is a better all-around solution, it looks like he was an a VBA mindset with all the extra quotes.
 
Upvote 0
1.7801:18:43:11
=OFFSET(M1,MATCH(G1,M2:M5001,0),11)

this works up to 50 days in 0.01 decimal intrvals this is around 15 minutes

yes - a table of pre-calculated times

<colgroup><col><col><col span="3"></colgroup><tbody>
</tbody>
 
Upvote 0

Forum statistics

Threads
1,216,099
Messages
6,128,820
Members
449,469
Latest member
Kingwi11y

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