+ Reply to Thread
Results 1 to 31 of 31

Stock allocation

  1. #1
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Stock allocation

    Experts,

    I need your help to solve my problem.
    Qty fulfillment already been defined, but the problem is the stock at different locations,
    and I need it to be mapped from the WH to the stores based on store rank priority.


    Thanks
    Attached Files Attached Files
    Last edited by halimgunawan; 07-08-2020 at 08:39 PM.

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365
    Posts
    3,184

    Re: Stock allocation

    Hello,
    can you please fill in the table manually to give a concept of how you would like to allocate ? An explanation would also help.

    Thanks.

  3. #3
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    I have updated attachment above
    Last edited by AliGW; 07-09-2020 at 12:21 AM. Reason: Please don’t quote unnecessarily!

  4. #4
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,641

    Re: Stock allocation

    Where and which range is your expected result?
    Quang PT

  5. #5
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    on example file, the result is at range A12:D23
    Last edited by AliGW; 07-09-2020 at 12:22 AM. Reason: Please don’t quote unnecessarily!

  6. #6
    Forum Contributor
    Join Date
    05-08-2020
    Location
    Lublin, Poland
    MS-Off Ver
    365v.2409 - office laptop (used also elsewhere); 2016 - office desktop, 2010, 2019 - private laptop
    Posts
    191

    Re: Stock allocation

    @halimgunawan
    What is the meaning of "priority"? Does it mean that stores with larger rank values obtain needed stock before those with smaller rank values?
    Anyway, what I can see now, it looks to me like an optimization problem which can be solved by using Solver.
    The decision variables would be numbers of a particular stock allocated to the specific store (5 stock types *10 stores =50 variables). To take priorities into account the objective function should be a sumproduct of numbers of stock items and ranks of stores. The constraints should ensure not exceeding the stock amounts and fulfilling the needs of stores as much as possible.

    One remark. Your example solution describes allocation not only a particular stock to stores, but also a particular stock from a particular warehouse to stores. However, without extra parameters which differ in any way one WH from another, such detailed allocation is basically impossible to be done in a unique way.
    Let's consider K-123. The stores need 11 pieces of K-123 altogether and the warehouses have 8 pieces of K-123 altogether. The warehouses send all what they have of this stock, but particular allocations "WH to store" are not unique.
    Your example is
    K-123 WH1 Store 1 2
    K-123 WH1 Store 2 2
    K-123 WH2 Store 2 1
    K-123 WH2 Store 6 2
    K-123 WH3 Store 6 1
    But for example an allocation plan
    K-123 WH1 Store 1 2
    K-123 WH2 Store 2 2
    K-123 WH2 Store 2 1
    K-123 WH1 Store 6 2
    K-123 WH3 Store 6 1
    is different from yours but equivalent in the sense of how your problem is specified.

    Later today I'll try to prepare an file with a Solver optimization model.
    Przemyslaw Kowalik, Lublin Univ. of Technology

  7. #7
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    @Pkowalik

    The stores with larger rank values obatin more priority to be fulfilled if the WH stock is limited.
    yes, pls help me @Pkowalik

  8. #8
    Forum Contributor
    Join Date
    05-08-2020
    Location
    Lublin, Poland
    MS-Off Ver
    365v.2409 - office laptop (used also elsewhere); 2016 - office desktop, 2010, 2019 - private laptop
    Posts
    191

    Re: Stock allocation

    OK, so try this.
    If fact, as you notced, priorities for stores really matter only in case when the total needs of all the stores for a specific stock exceed the total availability of that stock in all the warehouses. Otherwise, you can supply the stores with all the stock items they need anyway.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    @Pkowalik

    this is not what I want. the expected result is at range A12:D23

  10. #10
    Forum Contributor
    Join Date
    05-08-2020
    Location
    Lublin, Poland
    MS-Off Ver
    365v.2409 - office laptop (used also elsewhere); 2016 - office desktop, 2010, 2019 - private laptop
    Posts
    191

    Re: Stock allocation

    What do you mean by "expected result"?
    The format of output data
    stock code - WH number - store number -quantity
    or an exact solution?

    About an exact solution, I mean in your solution K-123 is allocated
    Store 1 2
    Store 2 2+1 = 3
    Store 6 2+1 = 3
    whereas in mine
    Store 2 2
    Store 4 1
    Store 5 2
    Store 6 3

    Is it something wrong about priorities?
    I calculated the "priority performance" for deliveries of K-123 to stores (qty multiplied by rank) as 2*2 + 1*4 + 2*5 + 3*3=27.
    In your solution it is 2*1+3*2+3*3=17.

  11. #11
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81
    The result I want is not that, what I want is how to show like the table I put on the example file using the allocated qty already defined to the stores..meaning, how i can create the table from, to, qty??

  12. #12
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    anyone can help me pls?

  13. #13
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    Experts, pls help..

  14. #14
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365
    Posts
    3,184

    Re: Stock allocation

    I think that maybe this is too complicated for excel. you need stock management software

  15. #15
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,641

    Re: Stock allocation

    Seen it several time and waiting for solution from other experts...
    Anyway, it is so complicated because it required:
    Each row down from D13:
    1) To update the stock of current code in each Warehouse
    2) To determind which store to feed, base on rank level and either WH capacity or store needs

    I believe it can not be solved with one single formula.

    Do you mind using some helper columns (or tables probably) some where in the worksheet?

  16. #16
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81
    It's ok to add some helper columns as long as the outcome tge same as the expected result.

    Now i think if it could be solved using vba macro coding? Anyone can help please?

  17. #17
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,641

    Re: Stock allocation

    For each row in input field, i.e, row 13, I try to calculate beginning and ending stock of each warehouse (J13:O13) and the remain of each store requirement (Q13:Z13) for code in A13
    If you want to hide these tables, move it in to column AA than hide the column.
    Attached Files Attached Files

  18. #18
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    Hello bebo021999, you are amazing...
    could you please explain your logic? so I can edit it myself in the future..thanksss

  19. #19
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,641

    Re: Stock allocation

    In fact, it is too complicated to explain in words! And my English is so bad. Sorry about that.
    Basically for each row, try to record the warehouse stock, the stock requirement... in helper tables
    I am not doubt that it could be solve with VBA in professional way...

  20. #20
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    anyway bebo021999, if I change the "qty to fulfill" into different numbers, why the result become N/A ?
    Last edited by halimgunawan; 07-13-2020 at 06:56 AM.

  21. #21
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,641

    Re: Stock allocation

    Post the worksheet again with the error to see what happenned

  22. #22
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    as attached, if i changed numbers the result become N/A
    Attached Files Attached Files

  23. #23
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,831

    Re: Stock allocation

    Perhaps the following will help.
    I added two helper columns which may be moved and/or hidden for aesthetic purposes.
    The first helper displays the total Qty to fill for each row using: =SUM(Q3:Z3)
    The second displays the number of rows to increment using: =IF(A4="",1,AGGREGATE(15,6,(ROW(A4:A$7)-ROW(A3))/(AA4:AA$7>0),1))
    The formula in A14:A23 has been modified to read:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Formulas in B14:D14 and down have been prepended using: =IF(A14="","",...
    Let us know if you have any questions.
    Attached Files Attached Files
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

  24. #24
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    JeteMc, thanks for your help, I have checked your work
    however when I changed the first row of field "qty to fulfill" into zero (highlighted in blue)
    the result become N/A, could you pls help on this issue?
    Attached Files Attached Files

  25. #25
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,831

    Re: Stock allocation

    Paste the following into cell A13:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Note this formula is for cell A13 only.
    Let us know if you have any questions.

  26. #26
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    Hi JeteMc,

    sorry to bother you again, i have tried your formula on real data and found it error, I have been trying to figure out what went wrong with the formula
    but still unable to find it. could you pls help me again?
    Attached Files Attached Files

  27. #27
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,831

    Re: Stock allocation

    I believe that at least part of the problem is that in the real data there are codes that do not have stock in any of the 5 warehouses.
    Make the following modification to cell BC3 and down: =MIN(SUM(B3:F3),SUM(AF3:BB3))
    Let us know if you have any more problems and/or questions.

  28. #28
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    thank you very much JeteMc, you are amazing..

  29. #29
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,831

    Re: Stock allocation

    You're Welcome. Remember that bebo did most of the work. Thank You for the feedback and for marking the thread as 'Solved'. I hope that you have a blessed day.

  30. #30
    Registered User
    Join Date
    06-24-2020
    Location
    Jakarta
    MS-Off Ver
    MS 365
    Posts
    81

    Re: Stock allocation

    Hi JeteMc,

    after some trial, I found the #NUM! result at cell CZ1546:CZ1550, could you pls help to check on this issue?


    Thanks alot anyway..
    Attached Files Attached Files

  31. #31
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 365 version 2501
    Posts
    18,831

    Re: Stock allocation

    Try pasting the following in cell BE3 and then copying down:
    Formula: copy to clipboard
    Please Login or Register  to view this content.

    Let us know if you have any questions/problems.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Material Stock Allocation based on order date & distribute value evenly
    By srglt332 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 05-15-2020, 07:14 AM
  2. Stock Allocation Report Dashboard need to prepare
    By malik.arjun1986 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-06-2019, 11:04 AM
  3. [SOLVED] stock allocation calculator help
    By reggie:| in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 07-12-2016, 02:28 PM
  4. Equal allocation of stock variations
    By Gem1979 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 12-04-2014, 10:14 AM
  5. [SOLVED] Stock cost allocation
    By Aland2929 in forum Excel General
    Replies: 2
    Last Post: 02-17-2013, 10:27 AM
  6. Replies: 0
    Last Post: 10-28-2012, 07:22 AM
  7. Stock allocation against order Pick List
    By mikestar in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-05-2011, 09:45 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1