Lilyput said:
I've copied the formula this time and it is entered in my
sheet as an array formula however I don't seem to be
able to copy>paste special values>formula which is the
only way i can thionk of copying it without actually going
into the formula bar which takes the curly brackets away.
Don't worry about it. Copying from Formula Bar is just fine. You cannot
copy the curly braces, to my knowledge. And if you could, that might result
in scolding from those who might mistakenly think you actually entered the
curly braces manually. It is sufficient for you to say that you entered it
as an array formula, __and__ you see the curly braces in the Formula Bar
(confirmation).
Lilyput wrote previously:
I have added = Round(),0 to my formula but what happens
is that results below 0.5 are ignored and adding up the
results now rounded up does not result in monthly target.
This is a common quantization problem, i.e. the result of rounding "long"
decimal fractions to fewer decimal places (or integers). There are no
perfect solutions.
Consider the following simple example. You have 3 dollar bills, and you
want to award them to 4 people in the proportion to their contributions,
which is 25% each. It can't be done! At least, not fairly. Someone must
get zero.
One simple (and very flawed) approach is to put the following formulas into
A1 and A2, say, and copy A2 down through A29:
A1: =ROUND(Profiles!D$4*'Customer share'!G8),0)
A2: =MIN(Profiles!D$4 - SUM($A$1:A1),
ROUND(Profiles!D$4*'Customer share'!G9),0))
I assume that Profiles!D4 is the target, and 'Customer share'!G8:G36 are the
%shares.
That is approach is flawed because it is more unfair to the people
represented by the later cells.
I have tried other approaches in the past. But I think there is a
worst-case scenario for each one. (I would have to do a search to find them.)
PS: It is unclear to me what you are trying to compute with the
SUM(IF(...)) formula, which might be better written as a non-array SUMPRODUCT
formula.
----- original message -----