I was able to get to a formula using the formulas of QUOCIENTE
calculating the entire division of a division, and the formula MOD
which returns the rest of the entire division.
Day
To calculate the hours, we use the function QUOCIENTE
with the time in minutes in the numerator and the value of 1440 (amount of minutes in 1 day) in the denominator, returning the entire division of the total minutes and the amount of minutes in a day:
=QUOCIENTE(A1;1440)
Time
To calculate the hours, we use the function again QUOCIENTE
, where in the numerator goes the function MOD
, returning the rest of the entire days division and the value 60 in the denominator, which is the amount of minutes in one hour:
=QUOCIENTE(MOD(A1;1440);60)
Minute
To calculate minutes, we calculate the entire value of the rest of the split between the rest of the days divided with the value 60:
=INT(MOD(MOD(A1;1440);60))
According to
Finally, to calculate the seconds, we use the total value of minutes minus the total integer value of minutes to obtain only the numbers after the decimal places, which are equivalent to the seconds, then just multiply by 60 seconds:
=INT((A1-INT(A1))*60)
After that you just put it all together.
The complete formula stays like this, where A1
is your cell where you will place the number in minutes to calculate the time.
=QUOCIENTE(A1;1440)&"d "&QUOCIENTE(MOD(A1;1440);60)&"h "&INT(MOD(MOD(A1;1440);60))&"m " &INT((A1-INT(A1))*60) & "s"
See more about the function MOD and QUOTIENT
Perfect! It worked great, and thank you for the detailed explanation.
– Arthur Valenca