+ Reply to Thread
Results 1 to 4 of 4

Automatically complete availability dates in a MRP planning sheet

  1. #1
    Registered User
    Join Date
    03-03-2021
    Location
    Ploiești, Romania
    MS-Off Ver
    Office 365
    Posts
    2

    Automatically complete availability dates in a MRP planning sheet

    Hello, Excel masters

    I've just joined this forum hoping I can find the answer to a small problem I'm facing and I humbly ask for your ideas to solve it.
    I have tried to find the same problem in previous posts, but there are so many of them and time is not on my side.

    The attached example shows a basic material requirements/planning sheet, in which:
    - column A: Date when the quantity is planned to enter or exit the warehouse
    - column B: The quantity planned to enter/exit the warehouse
    - column C: The balance quantity

    I wonder if there is a way (standard Excel formulas or VBA macro) to show in column D the date when the negatives will be fulfilled (either in the past or in the future). I have calculated manually the dates in column E, but I cannot replicate the logic with formulas.

    I use Office 365 on regular basis but on the lower level of difficulty.
    Please let me know if there is any other info I need to provide.

    Thank you,
    Alin
    Attached Files Attached Files

  2. #2
    Forum Expert dflak's Avatar
    Join Date
    11-24-2015
    Location
    North Carolina
    MS-Off Ver
    365
    Posts
    7,920

    Re: Automatically complete availability dates in a MRP planning sheet

    I added a helper column or two.

    The first calculates the row on which the balance returns to positive. =IF(C2<0,MATCH(TRUE,C3:C14>0,0),"") - This used to be entered in as an array formula. Now it works as a regular formula. What it basically says is if the balance is negative in this row, look at the rows below and return the relative row where the balance first goes above zero. By relative row, I mean that if 1 is returned that means row 3 (the first row below the negative balance.) If 2 is returned then it means row 4 (the second row below the negative balance) and so on.

    The next formula is =IF(ISNUMBER(E2),INDEX(A3:A14,E2,1),"") - This means look at the range of dates below the negative value, look on the row computed in column E and return the value from that.

    There is a "gap" in the range to look at. I am always looking that the 11 rows below. When you get to the bottom of the table, you are still looking at 11 rows below. In theory, I should be searching for the end of the data, but I am assuming that the balance will go positive within 11 rows. I am assuming that you will be adding rows and copying down the formula, so I left it "floating."
    Attached Files Attached Files
    One spreadsheet to rule them all. One spreadsheet to find them. One spreadsheet to bring them all and at corporate, bind them.

    A picture is worth a thousand words, but a sample spreadsheet is more likely to be worked on.

  3. #3
    Registered User
    Join Date
    03-03-2021
    Location
    Ploiești, Romania
    MS-Off Ver
    Office 365
    Posts
    2

    Re: Automatically complete availability dates in a MRP planning sheet

    Thank you very much, dflak!

    You made it look so easy. I wish I will have the same wisdom someday...

    I now realize my initial request is wrongly formulated: I need the negatives from the column B to have the date of availability filled in. Thatīs why I have put manually the values on the negative rows of column B, just to guide the logic.

    I will try to use your solution as the starting point and move forward, but may I dare ask you to try and take a look also?

    Thanks again,
    Alin

  4. #4
    Forum Guru
    Join Date
    08-28-2014
    Location
    USA
    MS-Off Ver
    Excel 2019
    Posts
    17,552

    Re: Automatically complete availability dates in a MRP planning sheet

    Hello alin and Welcome to Excel Forum.
    I cheated a bit to come up with this proposal.
    In instances where column B has a negative and a positive value for the same date, the negative value is listed first.
    The formula in column D is then: =IF(C2<0,AGGREGATE(15,6,A3:A$16/(B3:B$16>-C2),1),IF(B2<0,AGGREGATE(14,6,A$1:A1/(C$1:C1>-B2),1),""))
    Let us know if you have any questions.
    Consider taking the time to add to the reputation of everybody that has taken the time to respond to your query.

+ 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. Analyze data from a name-date-availability sheet
    By SMlLE in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 07-05-2017, 10:05 AM
  2. availability sheet
    By dougers1 in forum Excel General
    Replies: 4
    Last Post: 09-05-2016, 05:01 PM
  3. Percent Complete - Capturing Historical Data and Planning Forward
    By rcorkren in forum Excel Formulas & Functions
    Replies: 0
    Last Post: 03-14-2016, 03:04 PM
  4. Copy complete rows matching criteria to another sheet automatically
    By abdulahadzafar in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-05-2014, 12:09 PM
  5. Autofilter dates by setting a planning window
    By kawa13 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-06-2013, 10:22 AM
  6. Enter dates and return availability
    By Statler in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-30-2006, 06:50 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