+ Reply to Thread
Results 1 to 14 of 14

MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

  1. #1
    Registered User
    Join Date
    12-21-2018
    Location
    RI, USA
    MS-Off Ver
    Office 365
    Posts
    26

    MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Good Morning: New User here - Longtime fan of the Excel forum:

    In my sample attachment: the following data:
    Column B: Inventory Item #
    Column H: Quantities (On Hand / On Order / Required by Customer)
    Column J: Customer required Delivery Date
    Column K: (Existing formula to determine running Cumulative Total Quantity per Inventory Item #)
    Column L: Inventory Classifications (A = On Hand, B = On Order, C = Individual Customer Order Requirements/Allocations)
    Column M: ** This is where I'd like to enter a formula to determine (for each Item #) - the date on which there will be insufficient inventory to fill the Customer's Order

    Methodology:
    "A" Inventory Classification is noted as a positive number (Quantity on Hand)
    "B" Inventory Classification is noted as a positive number (Quantity on Order)
    "C" Inventory Classification could be noted as either a positive, or negative number (Quantity required to fill Orders by Customer)
    (if the Quantity associated with "C" Classifications is negative - it suggests a Customer demand for the Item #)
    (if the Quantity associated with "C" Classifications is positive - it suggests Inventory was over-issued, and will return to inventory upon job completion)

    Attachment (Excel sample.jpg):
    Displays three (3) possibilities (Item #'s 0324, 0665 and K1466)

    Example 0324:
    Cumulative Quantity on Hand + Quantity on Order - Customer Requirement Quantities "runs out" (goes negative) on the date of 03/20/2019: This is the date to return in the formula.

    Example 0665 (tricky one):
    Cumulative Quantity on Hand + Quantity on Order - Customer Requirement Quantities "runs out" (goes negative) on the date of 12/17/2018: however, there is inventory returned (145.83) on 12/27/2018, which is enough to satisfy the order for 01/18/2019. Then, the requirement of <58.500> on the Order for 02/28/2019 "runs out" the available inventory. This is the date to return in the formula. 02/28/2019 In other words, The run out date needed for Column "M" is the last time the cumulative inventory runs into the negative.

    Example K1466:
    Cumulative Quantity on Hand + Quantity on Order - Customer Requirement Quantities never "runs out" (goes negative). A "text" return of "OK" would be sufficient, as there is no current run-out date.

    I'd like to find a formula solution which would return one specific run-out date (or the text "OK" for each change in Item # (Column "B")

    Thank you for the opportunity to share this. Dave
    Attached Images Attached Images

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,063

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Will you please attach a SMALL sample Excel workbook (10-20 rows of data is usually enough)? However, please give us an indication of the approximate number of rows of data you want the solution to work with (100, 1000, 100,000 or whatever). Please don't attach a picture of an Excel sheet (no-one will want to re-type all your stuff before starting).

    1. It does NOT have to be your real sheet - mock up a SAMPLE if you need to. But not 1000's of rows!!! It makes manual checking so tedious. Whatever you do... make sure that all confidential information is removed first!!

    2. Make sure that your sample data are truly REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    3. Make sure that your desired solution is also shown (mock up the results manually).

    4. Try to avoid using merged cells. They cause lots of problems!

    Unfortunately the attachment icon doesn't work at the moment. So, to attach an Excel file you have to do the following: Just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    12-21-2018
    Location
    RI, USA
    MS-Off Ver
    Office 365
    Posts
    26

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Glenn:

    Thank you for your prompt response. I've attached a small Excel file snippet of data (instead of the picture).

    My overall file will have rows in the 3000-5000 range at present, with approximately 1-500 unique Item Numbers.

    I've noted the desired solution (now in Column "F") - as when I pasted, my original had hidden rows.
    (The column identifiers in the current Excel attachment are slightly different from those documented in my original post).

    Dave
    Attached Files Attached Files

  4. #4
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Not sure if this work with more sample
    Please try at F2 and copy down

    =IFERROR(IF(LOOKUP(2,1/(($A$2:$A$99=A2)*$D$2:$D$99<0)/($D$1:$D$98>=0),$C$2:$C$99)=C2,C2,""),IF(A2<>A1,"OK",""))

  5. #5
    Registered User
    Join Date
    12-21-2018
    Location
    RI, USA
    MS-Off Ver
    Office 365
    Posts
    26

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Bo_Ry: You're input is much appreciated. I'm testing on my sample Excel and results seem promising.

    As I'm trying to adapt to my master Excel, I have a question:

    In your suggestion, can you clarify the 2 right after the (LOOKUP? - was that meant to specify a particular column? Or, reference from the starting Column "F"?

    =IFERROR(IF(LOOKUP(2,1/(($A$2:$A$99=A2)*$D$2:$D$99<0)/($D$1:$D$21>=0),$C$2:$C$99)=C2,C2,""),IF(A2<>A1,"OK",""))

    I feel progress on the way... thank you. Dave

  6. #6
    Registered User
    Join Date
    12-21-2018
    Location
    RI, USA
    MS-Off Ver
    Office 365
    Posts
    26

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Bo:

    Further clarification:

    In my Excel Master file: My columns are as noted below:

    Column B: Inventory Item #
    Column H: Quantities (On Hand / On Order / Required by Customer)
    Column J: Customer required Delivery Date
    Column K: (Existing formula to determine running Cumulative Total Quantity per Inventory Item #)
    Column L: Inventory Classifications (A = On Hand, B = On Order, C = Individual Customer Order Requirements/Allocations)
    Column M: ** This is where I'd like to enter a formula to determine (for each Item #) - the date on which there will be insufficient inventory to fill the Customer's Order

    I hope this does not confuse the issue. Dave

  7. #7
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    =Lookup(2,1/(criteria),result) is use for find last value that match criteria.
    For 0665 12/17/18 and 2/28/19 that give true on these criteria 1/(($A$2:$A$99=A2)*$D$2:$D$99<0)/($D$1:$D$98>=0)

    True will give 1/True = 1/1 = 1 , while False give 1/False = 1/0 = #DIV/0

    Lookup will look for last number that less that 2, this will give the 2nd True and result 2/28/19

  8. #8
    Registered User
    Join Date
    12-21-2018
    Location
    RI, USA
    MS-Off Ver
    Office 365
    Posts
    26

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Bo:

    Thank you. I will be reviewing shortly, and running a final test in the morning.

    Much appreciated,

    Dave

  9. #9
    Registered User
    Join Date
    12-21-2018
    Location
    RI, USA
    MS-Off Ver
    Office 365
    Posts
    26

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Bo:

    I really do appreciate your time and effort.

    As you had originally surmised, the formula ceases to work as desired past row 100 or so.

    At present, the row count is in the 2500-3000 range. Do you think a tweak to the proposed formula would work?

    Or, perhaps a slightly different approach?

    Happy New Year,

    Dave

  10. #10
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Dave

    You may try this at F2 and see

    =IFERROR(IF(LOOKUP(2,1/(($A$2:$A$9999=A2)*$D$2:$D$9999<0)/($D$1:$D$9998>=0),$C$2:$C$9999)=C2,C2,""),IF(A2<>A1,"OK",""))

    Quote Originally Posted by Dave_in_RI View Post

    Column B: Inventory Item #
    Column H: Quantities (On Hand / On Order / Required by Customer)
    Column J: Customer required Delivery Date
    Column K: (Existing formula to determine running Cumulative Total Quantity per Inventory Item #)
    Column L: Inventory Classifications (A = On Hand, B = On Order, C = Individual Customer Order Requirements/Allocations)
    Column M: ** This is where I'd like to enter a formula to determine (for each Item #) - the date on which there will be insufficient inventory to fill the Customer's Order
    or at M2
    =IFERROR(IF(LOOKUP(2,1/(($B$2:$B$9999=B2)*$K$2:$K$9999<0)/($K$1:$K$9998>=0),$J$2:$J$9999)=J2,J2,""),IF(B2<>B1,"OK",""))

  11. #11
    Registered User
    Join Date
    12-21-2018
    Location
    RI, USA
    MS-Off Ver
    Office 365
    Posts
    26

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Bo!

    This is Brilliant :-) Works like a charm.

    Thank you for your thoughtful insight and expertise.

    Happy New Year,

    Dave

  12. #12
    Registered User
    Join Date
    12-21-2018
    Location
    RI, USA
    MS-Off Ver
    Office 365
    Posts
    26

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Bo:

    Happy New Year. Per your suggestion, I've copied the formula to M2, and it seems to be working nicely.

    After some additional testing, I do have an additional challenge.

    The next step after performing the formula provided would be a VLOOKUP on the results. (COLUMN "M")

    In order for the smooth processing of the VLOOKUP, might you have a suggestion on returning *one* result (In Column "M") on the first line of each corresponding unique change in Inventory Number (Column "B")?

    Thank you for taking time to help, it is really appreciated.

    Dave
    Last edited by Dave_in_RI; 01-03-2019 at 01:39 PM. Reason: slight correction / clarification

  13. #13
    Forum Guru Bo_Ry's Avatar
    Join Date
    09-10-2018
    Location
    Thailand
    MS-Off Ver
    MS 365
    Posts
    7,211

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Please try at M2

    =IF(B2=B1,"",IFERROR(LOOKUP(2,1/(($B$2:$B$99=B2)*$K$2:$K$99<0)/($K$1:$K$98>=0),$J$2:$J$99),"OK"))

  14. #14
    Registered User
    Join Date
    12-21-2018
    Location
    RI, USA
    MS-Off Ver
    Office 365
    Posts
    26

    Re: MRP: Materials Planning Model: Formula suggestion needed (Run out Date of Materials)

    Bo:

    So Good!

    I've made a slight modification (noted in bold below:

    =IF(B2=B1,"",IFERROR(LOOKUP(2,1/(($B$2:$B$9999=B2)*$K$2:$K$9999<0)/($K$1:$K$9998>=0),$J$2:$J$9999),"OK"))

    This seems to work beautifully.

    Thank you for your assistance.

    Dave

+ 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. Need Excel Formula for Indented Bill Of Materials
    By stalinc434 in forum Excel General
    Replies: 3
    Last Post: 08-18-2021, 11:31 PM
  2. Help with creating a formula to manage cost of materials per month
    By chris.gbrwn in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 04-02-2016, 09:47 AM
  3. [SOLVED] Need help with formula to calculate materials
    By wrestler79 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 05-06-2013, 01:03 PM
  4. [SOLVED] Help with Formula to Classify Shipments based on differnt materials on an order
    By Pi* in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 04-06-2013, 09:59 AM
  5. I am trying to search MRP Materials Resource Planning Excel example
    By dyjoshi in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-04-2013, 04:03 AM
  6. [SOLVED] Variable materials and prices formula
    By Onesock in forum Excel General
    Replies: 13
    Last Post: 12-07-2012, 06:08 PM

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