Tom's Guide | Tom's Hardware | Tom's Games
![]() |
![]() |
![]() |
Hi All
I need some help with a certain Excel formula. Hopefully my explanation is clear enough.
Basically I have 3 columns - Days, Hours and Minutes. Currently I put in data for each column and it is added up individually so for example after entering the data I could end up with a total of 3 days 29 hours and 76 mins.
I would like to be able to convert the mins into hours and hours into days automatically, so when entering the same data it gives me the following - 4 days, 6 hours and 16 mins.
Can anyone help me with a formula that can do this?

You explained pretty well, but just to clarify.... I'm guessing you want to put in the minutes the full amount? Like 546 minutes and then have a formula calculate how many days, hours that was with remaining minutes?
When all else fails beat the $%!* out of it!!!

I've been trying, and haven't figured it out yet. If I do, I'll either email or repost for you. Please do the same if you get it. As of yet I don't see how it's possible (but I'm having a lot of fun trying)
When all else fails, beat the %*#$! out of it!!!

I did this through VBA
basically saying in 121 mins divide by minutes in a day if minus go to hours etc:
Here is the code. I wrote the program on excel and can mail you if you like:
Sub Macro1()
'days
asak = Range("b5")
For askas = 1 To 10000000
asak = asak - 1440
If asak - 1440 < 0 Then GoTo esca
Next askas
esca:
Range("c5") = askas
'hours
If asak = 0 Then Exit Sub
For askas = 1 To 1000000
asak = asak - 60
If asak - 60 < 0 Then GoTo esca2
Next askas
esca2:
Range("d5") = askas
If asak = 0 Then Exit Sub
Range("e5") = asak
'mins
End Sub
-

I think you are trying too hard.
Cell Formulas
Days = TDay+INT((THr+INT(TMin/60))/24)
Hours = (THr+INT(TMin/60))-INT((THr+INT(TMin/60))/24)*24
Minutes = TMin-(INT(TMin/60)*60)where
Tday = Total Days
THr = Total Hours
Tmin = Total Minutes

And I thought I did good in excel. You guys (and I'm sure a lot more) make me feel like an ameteur.
When all else fails beat the $%!* out of it!!!

![]() |
![]() |
![]() |

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.
| Ads by Google |