Forum Discussion
Kevin_decs
Jan 10, 2023Copper Contributor
Splitting fractions from whole numbers
Can anyone help me, I want split a number of hours in to weeks, days and hours in three seperate fields, rather do a simple divide that will give me a decimal answer. Thank you
- Jan 10, 2023
Let's say you have a number of hours in D2.
The number of weeks is =QUOTIENT(D2,168)
The number of days is =QUOTIENT(MOD(D2,168),24)
The number of hours is =MOD(D2,24)
These formulas can be filled down if required.
cstatham
May 01, 2024Copper Contributor
You are probably correct the formula CoPilot AI returned is 44 hours 50 minutes.
=INT(G6)&" hours " & ROUND((G6-INT(G6))*60, 0) & " minutes"
However, what we have been doing is:
just dealing with the decimal in 44.83 like this =83/60
then the result 1.38.333 and adding back to the whole number 44 + 1.38333 = 45.38333
which I think is incorrect but that is how we have been doing it.
Please clarify for me the procedure and steps.
=INT(G6)&" hours " & ROUND((G6-INT(G6))*60, 0) & " minutes"
However, what we have been doing is:
just dealing with the decimal in 44.83 like this =83/60
then the result 1.38.333 and adding back to the whole number 44 + 1.38333 = 45.38333
which I think is incorrect but that is how we have been doing it.
Please clarify for me the procedure and steps.
HansVogelaar
May 01, 2024MVP
- cstathamMay 01, 2024Copper Contributor=INT(C2)+MOD(C2, 1)/0.6
returned 45.38.333 when C2 contains 44.83
=INT(G6)&" hours " & ROUND((G6-INT(G6))*60, 0) & " minutes"
returned 44 hours 50 minutes when G6 contains 44.83