Apportioning values but keep in minimum value in formula

booms

Board Regular
Joined
Dec 2, 2010
Messages
58
Hi all,

This might be as much a maths question as an excel question.

I’m trying to apportion a value between twenty different descriptors. This is linearly apportioned based on another numeric feature and will add up to the original value, example below.

However, to make things complicated, I want to ensure that none of the apportioned values fall below a minimum, whilst still making sure that all twenty will add up to the original value.

Is there anyway I can do this in formula rather than in VBA?

For example apportioning linearly below, 'D', ends up with 106k. Can I set a minimum value, of say, 150k, that would then automatically adjust all the other values to linearly apportion the remainder whilst still adding up to 10m?

Total to apportion10,000,000.00
Numeric featureApportioned value
A0.901310638805,843.83
B0.803327803718,239.33
C0.302376282270,348.59
D0.118878557106,286.94
E0.940530667840,909.67
F0.241567195215,980.40
G0.81744142730,858.04
H0.521753703466,489.56
I0.337175248301,461.65
J0.612220382547,374.01
K0.781189611698,446.02
L0.772540213690,712.77
M0.19931728178,205.60
N0.844274884754,849.30
O0.271566755242,802.41
P0.556527301497,579.94
Q0.539259607482,141.24
R0.765787615684,675.40
S0.364686522326,058.93
T0.492949588440,736.38
TOTAL 10,000,000.00

<colgroup><col><col><col></colgroup><tbody>
</tbody>

Thanks
 

Excel Facts

Copy a format multiple times
Select a formatted range. Double-click the Format Painter (left side of Home tab). You can paste formatting multiple times. Esc to stop
This can be tricky. By forcing some values to a given value, all the others are slightly shifted as well. Then you have to adjust those, and it becomes an iterative process. You can set something up with the Solver, or with iterative calculations, but both of those are awkward.

Another approach is to figure out which numeric features fall short of the threshold and assign them the minimum value. Then the rest of the total can be apportioned to the rest of the values. That would look like this:

ABC
1Total to apportion10,000,000.00
2Min value150,000.00
3Min numeric feature0.167770219
4
5Numeric featureApportioned value
60.901310638802283.3963
70.803327803715065.9617
80.302376282269154.1187
90.118878557150000
100.940530667837194.3102
110.241567195215026.1425
120.81744142727628.9118
130.521753703464428.4836
140.337175248300129.713
150.612220382544955.5643
160.781189611695360.0988
170.772540213687661.0125
180.19931728177418.237
190.844274884751514.1759
200.271566755241729.6427
210.556527301495381.4971
220.539259607480011.0093
230.765787615681650.3242
240.364686522324618.316
250.492949588438789.0845
2610,000,000.00

<tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
B3=B2/B1*SUM(A6:A25)
B6=IF(A6<$B$3,$B$2,A6/SUMIF($A$6:$A$25,">"&$B$3)*($B$1-COUNTIF($A$6:$A$25,"<="&$B$3)*$B$2))
B26=SUM(B6:B25)

<tbody>
</tbody>

<tbody>
</tbody>



This also has a few issues with how the percentages work, but it may be sufficient for your needs. Hope this helps.
 
Upvote 0
This can be tricky. By forcing some values to a given value, all the others are slightly shifted as well. Then you have to adjust those, and it becomes an iterative process. You can set something up with the Solver, or with iterative calculations, but both of those are awkward.

Another approach is to figure out which numeric features fall short of the threshold and assign them the minimum value. Then the rest of the total can be apportioned to the rest of the values. That would look like this:

ABC
1Total to apportion10,000,000.00
2Min value150,000.00
3Min numeric feature0.167770219
4
5Numeric featureApportioned value
60.901310638802283.3963
70.803327803715065.9617
80.302376282269154.1187
90.118878557150000
100.940530667837194.3102
110.241567195215026.1425
120.81744142727628.9118
130.521753703464428.4836
140.337175248300129.713
150.612220382544955.5643
160.781189611695360.0988
170.772540213687661.0125
180.19931728177418.237
190.844274884751514.1759
200.271566755241729.6427
210.556527301495381.4971
220.539259607480011.0093
230.765787615681650.3242
240.364686522324618.316
250.492949588438789.0845
2610,000,000.00

<tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
B3=B2/B1*SUM(A6:A25)
B6=IF(A6<$B$3,$B$2,A6/SUMIF($A$6:$A$25,">"&$B$3)*($B$1-COUNTIF($A$6:$A$25,"<="&$B$3)*$B$2))
B26=SUM(B6:B25)

<tbody>
</tbody>

<tbody>
</tbody>



This also has a few issues with how the percentages work, but it may be sufficient for your needs. Hope this helps.

Ah, that's very clever - thanks.

I guess there's still the problem that when you've identified those 'numeric features' that are too low and allocated the minimums - you've reduced the residual pool, so when those are linearly apportioned some might end up beneath the threshold. It is iterative - as you say.
 
Upvote 0
That's exactly the kind of problem I was talking about. However, I experimented a fair bit with the numbers, trying to force some allotment below the minimum. However, whenever I changed the values, the minimum numeric feature changed also, and I was never able to get anything below the minimum allotment. I can't say that it's impossible mathematically, I'd have to do some more analysis, but such cases would certainly be rare.
 
Upvote 0

Forum statistics

Threads
1,214,944
Messages
6,122,384
Members
449,080
Latest member
Armadillos

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top