Hello, I have a number in variable X. Variable X is a time for instance 10, 14.5, 17.9 hours.
I have n boxes which each contain 4 hours.
I need to figure out how many full 4 hour boxes X fits into, and fit the remainder into the last box.
Here is an example:
My excel formula must figure out how many boxes it will need and then allocate full box values (4) to each box until it reaches the final box which contain less than 4 hours. after that I need to multiple a percentage in each box as follows:
How is this possible? the MOD(number, divisor) function only give the remainder after division. I need how many it was divided and the remainder as a decimal.
I have n boxes which each contain 4 hours.
I need to figure out how many full 4 hour boxes X fits into, and fit the remainder into the last box.
Here is an example:
Code:
X=17.9 hours
Box 1 = 4
Box 2 = 4
Box 3 = 4
Box 4 = 4
Box 5 = 1.9
Code:
Box 1 total percentage = 4 * 0.8%
Box 2 total percentage = 4 * 0.96%
Box 3 total percentage = 4 * 1.16%
Box 4 total percentage = 4 * 1.27%
Box 5 total percentage = 1.9 * 1.39%
How is this possible? the MOD(number, divisor) function only give the remainder after division. I need how many it was divided and the remainder as a decimal.