Allocate a number (quantity) evenly, based on variable criteria (demand/quantity on hand)

bholmes9

New Member
Joined
Dec 29, 2016
Messages
3
Hi everyone!

I am looking to allocate a quantity evenly between several locations. Each location has a different average monthly sales and on hand quantity. I want to evenly distribute a quantity based on the location's demand and on hand quantity so that the final "Days Supply of Inventory" (DSI) is as evenly distributed as possible while utilizing the "quantity to allocate" of 130. I am convinced that there is a formula that can accomplish this however my searches have come up empty thus far!

LocationAverage Monthly Sales (cases)Inventory on Hand (cases)DSI = (30/AMS)*IOH
(days)
QUANTITY TO ALLOCATE
(cases)
Final DSI
(days)
12085127.5??
2314543.55??
3564524.11??
41006820.40??
5303333??
6423726.43??
7151020??
8272224.44??
Quantity to Allocate: 130

<tbody>
</tbody>

Thank you for your time and any help you can offer!

Cheers,

Ben
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Welcome to the forum.

I'm not sure there is an easy formula. However, Excel has a tool that might work for you called the Solver. Set up your sheet as below. It's essentially the same as your sample, but I put in the F3 formula and dragged down, I added the H3 formula to sum the values in column E, and I added the I3 formula. Standard Deviation is a measure of how spread out a group of numbers is. The smaller the standard deviation, the closer they are to each other, which is what you want to see.

ABCDEFGHI
1LocationAverage Monthly Sales (cases)Inventory on Hand (cases)DSI = (30/AMS)*IOHQUANTITY TO ALLOCATEFinal DSI
2(days)(cases)(days)AvailableSumStandard Deviation of Final DSI
312085127.50127.513013028.65898
42314543.548387245.483871
53564524.1071432939.642857
641006820.42828.8
753033331346
86423726.4285712342.857143
971510201550
108272224.4444442046.666667
11

<tbody>
</tbody>
Sheet2

Worksheet Formulas
CellFormula
D3=30/B3*C3
F3=30/B3*(C3+E3)
H3=SUM(E3:E10)
I3=STDEV.P(F3:F10)

<tbody>
</tbody>

<tbody>
</tbody>



Start with all the values in E3:E10 empty or set to 0. Put 130 in G3.

Go to the Data tab and click on Solver. If you don't have Solver showing, go to File > Options > Add-ins > click Go... on the bottom of the screen with Excel Add-ins in the drop-down > then check the Solver Add-in box and click OK.

In the Solver dialog box, set the options as follows:
Set Objective: $I$3
To: Min
By Changing Variable Cells: $E$3:$E$10
Subject to the Constraints:
$E$3:$E$10 = integer
$E$3:$E$10 >=0
$H$3=$G$3
Select a Solving Method: GRG Nonlinear

Then click Solve. It will think for a few seconds, and you should get the values shown in my screen shot. In this particular example, you're not going to get a great answer, since location 1 already has a DSI much greater than the rest and no matter how you allocate the inventory, the rest can't catch up.

Let me know if this helps!
 
Upvote 0
Eric,

Thanks for the quick response! I was getting on the right track and had already installed the solver add in when I got your post. However the standard deviation piece I surely would have missed. This solves my problem! Thank you, and have a great New Year!

Cheers,

Ben
 
Upvote 0
Eric,

Is there anyway you could account for the fact that the first location already has enough so that the quantity to be allocated is split more evenly among the locations that need it? The following (manually entered) quantities would achieve this but I am looking to automate that manual process if possible. Let me know your thoughts. Thanks!

QUANTITY DSI
0127.50
043.55
2638.04
6038.40
538.00
1738.57
938.00
13
38.89


<colgroup><col><col></colgroup><tbody>
</tbody>
 
Upvote 0
There are several ways to check "closeness" but I think standard deviation is probably the simplest in this case.

Glad you got it working! Happy New Year! :cool:

Edit: if you want to exclude location 1, just change the cell references in the H3 and I3 formulas to exclude row 3, and change the constraints in the Solver as well. When I did that, I got numbers very similar to the ones you manually obtained.

Also, as a curiosity, for the original layout, I took 60 cases away from location 1 (changed C3 to 25), and added them to the available count (changed G3 to 190), then ran the Solver. The final DSI for all locations was between 44 and 45, which is pretty close!
 
Last edited:
Upvote 0

Forum statistics

Threads
1,214,651
Messages
6,120,744
Members
448,989
Latest member
mariah3

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