how to limit the Weight of any weight distribution

F

Flawlesgem

I am reposting my question in this forum, as i didnt get any reply from
anyone for my post couple of days back, i dont know wats the reason;

I have to limit the weightage of value not more than 15%, this would be used
as benchmark weight, a

sample data is bleow;

Co. No. of Price Amount Weightage Required Weightage
Shares (APPROX vALUES)

A 1000 10 10000 10.25% 11.95%
B 800 12 9600 9.84% 11.47%
C 1200 14 16800 17.21% 15%
D 1100 16 17600 18.03% 15%
E 500 18 9000 9.22% 10.75%
F 300 20 6000 6.15% 7.17%
G 700 22 15400 15.78% 15%
H 550 24 13200 13.52% 15%

Total 97600


I need to limit the weightage upto 15% and excess would be divided among
other which are less than

15%, and if summation of orignal weightage and excess weightage from any
other co. wieghts would also

not be more than 15%, if it would be than excess of that co. weight should
also be distributed among

others. Price change is on daily basis.

In simple words as PIE chart work, if the erase any value within the range
the rest of the pie get

adjusted autometically.

Help requested
 
B

Bernie Deitrick

Flawless,

This solution assumes that your percentage values are in cells E1:E8.

In cell F1, array enter (enter using Ctrl-Shift-Enter) the formula

=IF(E1>=15%,15%,E1*(1+SUM(IF(E$1:E$8>=15%,E$1:E$8-15%,0))/SUM(IF(E$1:E$8<15%,E$1:E$8,0))))

and copy down to cells F2:F8. If you enter it correctly, Excel will put it inside curly braces
{ }

There is only one complication - this formula is not recursive, and does limit the increased value
to just 15% - in your example, the 13.52% will increase to 15.18% (if the percentages are increased
proportionately). To get around this, copy column F to column G, and use the column G's results
(though you may need to copy the formulas out to column H, I, or J!).

HTH,
Bernie
MS Excel MVP
 
F

Flawlesgem

Thanks, This seems working, but still there is an issue
the value orignally below 15% let say 13.52 (as in case of the last value of
13200 in my stated sample data, set to be more than 15%, i.e. 15.19% after
adjustment, the need is to keep the every wieght not more than 15% in any
case, prior of after adjustment.
Thanks and regards
 
F

Flawlesgem

sorry Deitrick for incomplete reply,
I was getting the same problem earlier, what is the possibility that after
how many times or after how many columns i will get the accurate result,
because i have a large data set and a index of 100 companies.

Thanks for your time
 
B

Bernie Deitrick

Flawless,

Just a rough guess, but my gut feeling is that is should converge within two
or, at most, three iterations. For your example, 6% of the total needed to
be spread around from the original values (1 iteration) and then 0.18% after
the second, and none after the third. And with 100 companies, it is less
likely that this would extend so far. At an upper limit, I am (guessing)
n/(1/limit) (in this case, 8/ (1/.15), or about 6) iterations would do it.
You could set up your sheet to use, say, ten columns of formulas, since
Excel is easily capable of handling thousands of formulas, with little
performance hit.

Another option is to use macros, or a UDF, which could conditionally iterate
in code rather than by using a preset number of columns. Also, you could
apply conditional formatting to highlight the entire column if any value is
over the threshold value of interest, and simply copy the columns further to
the right to get convergence in those case.

HTH,
Bernie
MS Excel MVP
 
S

Salman

Thanks again Bernie,
i will use the same method as u suggested as i am not good at VBA, i can
hardly understand the simple macros thats y i am try to solve this problem in
a normal course, i will use the same as u suggested and watch it actively to
from a sufficient time that how reliable it is.
Once again thanks
 
Top