Allocation/Distribution

SeaBearz

New Member
Joined
Aug 1, 2023
Messages
4
Office Version
  1. 2013
Platform
  1. Windows
Hello All,

After much researching, experimenting, and commensurate failure, I'm reaching out to see if anyone else can provide a solution to apparently a complex request.

1. Proportionate distribution of warehouse inventory by Item # amongst stores in that location that request a quantity of that item (ex. only Houston warehouses supply Houston Stores).
2. Prioritize a variable minimum number of items at certain stores (i.e. if a store needs only 1 item, make sure it gets 1 before another store gets 8).
3. Identify any underutilized warehouse inventory (can be a separate table).
4. It shouldn't make a difference, but I am working with two tables.


1721459068641.png



ABCDEFGHI
1Warehouse InventoryStore Orders
2Storage LocationItem #QuantityStore LocationStore #Item #Quantity NeededAllocation
3HoustonE1142
9​
HoustonStore 1E1142
8​
8​
4HoustonE4651
3​
HoustonStore 1E4651
1​
1​
5HoustonE12F2D
1​
HoustonStore 1E12F2D
2​
1​
6MontereyD7332
2​
HoustonStore 2E1142
2​
1​
7AustinE12F2D
1​
MontereyStore 1D7332
2​
2​
8AustinE3779
6​
AustinStore 1E12F2D
1​
1​
9AustinStore 1E3779
6​
5​
10AustinStore 2E12F2D
2​
0​
11AustinStore 2E3779
1​
1​
 

Excel Facts

Best way to learn Power Query?
Read M is for (Data) Monkey book by Ken Puls and Miguel Escobar. It is the complete guide to Power Query.
In I3 copied down to last Row.
Excel Formula:
=IF($H3=1,1,MAX(0,MIN(SUMIF($B$3:$B$8,$G3,$C$3:$C$8)-SUMIF($G$2:$G2,$G3,$H$2:$H2)-COUNTIFS($G4:$G$11,$G3,$H4:$H$11,1),$H3)))
 
Upvote 0
Modified formula in I3
Excel Formula:
=IF($H3=1,MAX(0,MIN(1,SUMIF($B$3:$B$8,$G3,$C$3:$C$8)-SUMIF($G$2:$G2,$G3,$I$2:$I2))),MAX(0,MIN(SUMIF($B$3:$B$8,$G3,$C$3:$C$8)-SUMIF($G$2:$G2,$G3,$H$2:$H2)-COUNTIFS($G4:$G$11,$G3,$H4:$H$11,1),$H3)))
 
Upvote 1
kvsrinivasamurthy,

This is exactly what I was I detailed in the initial post. However, one element I realized I failed to include is a minimum supply - I.e. I would like to have at least 1 in each store if warehouse inventory allows. Row 5 (Houston, Store 2, item # E1142) would allocate at least 1 before Houston Store 1 filled all 8.
 
Upvote 0
I am not clear. Try this in I3. If not Ok Pl upload file with expected result with some more rows.
Excel Formula:
=IF($H3=1,MAX(0,MIN(1,SUMIF($B$3:$B$8,$G3,$C$3:$C$8)-SUMIF($G$2:$G2,$G3,$I$2:$I2))),MAX(0,MIN(SUMIF($B$3:$B$8,$G3,$C$3:$C$8)-SUMIF($G$2:$G2,$G3,$I$2:$I2)-COUNTIFS($G4:$G$11,$G3,$H4:$H$11,1)- COUNTIFS($G4:$G$11,$G3,$F4:$F$11,"<>"&$F3),$H3)))
 
Upvote 0

Forum statistics

Threads
1,224,820
Messages
6,181,155
Members
453,021
Latest member
Justyna P

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