View Single Post
  #3   Report Post  
Posted to microsoft.public.excel.misc
 
Posts: n/a
Default Divide number and add remainder in another cell

"Dave O" wrote:
This will work mathematically, but I'm not sure it is as
elegant as it might be.


I am not convinced that it works "mathematically" for all
cases.

G24 is for the guy that works 50 claims.


You neglect to say exactly what this formula is. I believe
there are two choices:

a. =MIN(50,ROUND(1500/5,0))
b. =MIN(50,ROUNDDOWN(1500/5,0))

An example of failure can be found for each. See below.

H24 is [...]:
=ROUNDDOWN((1500-50)/4,0)
Same for the I24 employee.
The employee in J24 is [...]:
=ROUND((1500-50)/4,0)
[....]
The employee in K24 gets a number of claims that is
calculated slightly differently [...]:
=1500-SUM(G24:J24)


If G24 is computed by #b and we substitute 104 for "1500",
the distribution is 21, 20, 20, 21 and 22, when the optimal
(most even) distribution is 21, 21, 21, 21 and 20.

If G24 is computed by #a and we substitute 109 for "1500",
the distribution is 22, 21, 21, 22 and 23, when the optimal
distribution is 21, 22, 22, 22 and 22.

The point is: your mixture of ROUNDDOWN and ROUND
with a constant divisor seems arbitrary and works only by
accident. Of course, the catch-all in K24 should ensure
that the total adds up[*], but the distribution might not be
optimal, as demonstrated.
[*] I am not convinced that we cannot find an example
where K24 is negative, especially for a larger number
of employees, depending how you would choose to
round or round down, which is seemingly arbitrary.
To ensure that cannot happen, it might be prudent to
always round down (truncate). Of course, that might
lead to even less optimal distributions, with the most
claims assigned to K24. But at least K24 would never
be negative. Of course, I'm not sure employee K24
would appreciate it :-).