+ Reply to Thread
Results 1 to 9 of 9

Stock allocation tool, need formula with 2 conditions

  1. #1
    Registered User
    Join Date
    02-09-2023
    Location
    fregna
    MS-Off Ver
    2003
    Posts
    5

    Stock allocation tool, need formula with 2 conditions

    Cartel1.xlsx

    Hi there,

    I would really appreciate your help. I need a formula that takes the total value on D7 (18 in the example attached), and allocates the stock from D10 to D27 with the conditions from C2 and C3 (so minimum 1 case and maximum 3 cases per store). Lastly, if the stock is not enough, the formula should priorities the ones with the high priority value from C10 to C27.
    Many thanks for any help given
    Cristian

  2. #2
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,369

    Re: Stock allocation tool, need formula with 2 conditions

    Are you still using Excel 2003 ??? If not, please update your profile as answers DO depend on knowing this information.
    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED.

  3. #3
    Registered User
    Join Date
    02-09-2023
    Location
    fregna
    MS-Off Ver
    2003
    Posts
    5
    Quote Originally Posted by JohnTopley View Post
    Are you still using Excel 2003 ??? If not, please update your profile as answers DO depend on knowing this information.
    No i’m not. But can you help me with that formula?

  4. #4
    Registered User
    Join Date
    02-09-2023
    Location
    fregna
    MS-Off Ver
    2003
    Posts
    5

    Re: Stock allocation tool, need formula with 2 conditions

    Any help please?

  5. #5
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,026

    Re: Stock allocation tool, need formula with 2 conditions

    I don't sure what you wnat, maybe

    D10
    =MIN(IF(D$7/18<$C$2, IF(ROWS(D$10:D10)<=D$7/$C$2,$C$2+IF(ROWS(D$10:D10)<=MOD(D$7,$C$2),1,0),0), D$7/18 + IF(ROWS(D$10:D10)<=MOD(D$7,18),1,0)),$C$3)

    copied down and across.
    Attached Files Attached Files

  6. #6
    Registered User
    Join Date
    02-09-2023
    Location
    fregna
    MS-Off Ver
    2003
    Posts
    5
    Quote Originally Posted by windknife View Post
    I don't sure what you wnat, maybe

    D10
    =MIN(IF(D$7/18<$C$2, IF(ROWS(D$10:D10)<=D$7/$C$2,$C$2+IF(ROWS(D$10:D10)<=MOD(D$7,$C$2),1,0),0), D$7/18 + IF(ROWS(D$10:D10)<=MOD(D$7,18),1,0)),$C$3)

    copied down and across.

    Hi there, many thanks!
    It’s exactly what i need, but there is something wrong with the calculation, when stock is like higher that 25, it seems to allocate more than what’s available. It works fine with other number, it just doesn’t with all of them. Please can you fix it? Thanks again

  7. #7
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,959

    Re: Stock allocation tool, need formula with 2 conditions

    Administrative note
    Please update your profile as necessary to properly reflect the exact version(s) of Excel your question relates to. Members tailor answers based on your Excel version. Your profile does not indicate your current version.
    Thanks
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  8. #8
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,026

    Re: Stock allocation tool, need formula with 2 conditions

    try this,

    =MIN(IF(H$7/18<$C$2, IF(ROWS(H$10:H11)<=H$7/$C$2,$C$2+IF(ROWS(H$10:H11)<=MOD(H$7,$C$2),1,0),0), INT(H$7/18) + IF(ROWS(H$10:H11)<=MOD(H$7,18),1,0)),$C$3)

    copied down.
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    02-09-2023
    Location
    fregna
    MS-Off Ver
    2003
    Posts
    5

    Red face Re: Stock allocation tool, need formula with 2 conditions

    windknife THANK YOU!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
    It works 100%

+ 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. Stock Allocation value
    By isskint in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 11-15-2022, 09:55 AM
  2. Inventory Stock Allocation Formula
    By Sammiie29 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-13-2021, 03:50 PM
  3. Stock allocation
    By halimgunawan in forum Excel Formulas & Functions
    Replies: 30
    Last Post: 07-23-2020, 08:36 AM
  4. Stock Allocation
    By halimgunawan in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-08-2020, 12:37 PM
  5. [SOLVED] Excel VBA Allocation and Distribution tool does not allocate appropriately
    By ShawnJun in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 10-03-2019, 08:47 PM
  6. [SOLVED] VBA Allocation Tool Help
    By yidjacko in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 08-18-2014, 12:01 PM
  7. [SOLVED] Stock cost allocation
    By Aland2929 in forum Excel General
    Replies: 2
    Last Post: 02-17-2013, 10:27 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