+ Reply to Thread
Results 1 to 4 of 4

Return date when stock turns negative

  1. #1
    Registered User
    Join Date
    02-10-2015
    Location
    United Kingdom
    MS-Off Ver
    2010
    Posts
    25

    Unhappy Return date when stock turns negative

    Hi

    I am trying to create simple Index / Match formula to find out at which point (date) stock turns negative, but I can't figure out how to insert running total inside of MATCH function.


    Formula which I am using - =INDEX(D3:G3,MATCH(TRUE,SUM(B4-(D4:G4))<0,0))

    D3:G3 - Range with dates
    B4 - Current stock
    D4:G4 - Demand

    Anyway please see attached.

    THanks
    Attached Files Attached Files

  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 2406
    Posts
    44,662

    Re: Return date when stock turns negative

    One way, using an array formula:

    =IF(SUM(D4:G4)<B4,"",INDEX(D$3:G$3,MIN(IF(SUBTOTAL(9,OFFSET(D4,0,0,1,COLUMN(D4:G4)-COLUMN(D4)+1))>=B4,COLUMN(D4:G4)-COLUMN(D4)+1))))

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed in the FIRST CELL ONLY by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. After that, the array can be dragged down as normal, to cover the desired range.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    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

  3. #3
    Registered User
    Join Date
    02-10-2015
    Location
    United Kingdom
    MS-Off Ver
    2010
    Posts
    25

    Re: Return date when stock turns negative

    Awesome! Exactly what I am after.

    Thanks

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

    Re: Return date when stock turns negative

    You're welcome.



    If that takes care of your original question, please select "Thread Tools" from the menu link above and mark this thread as SOLVED.

    It'd also be appreciated if you were to click the Add Reputation button at the foot of any of the posts of all members who helped you reach a solution.

+ 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. If a number in column turns negative...
    By nipommu in forum Excel General
    Replies: 5
    Last Post: 01-18-2015, 09:54 PM
  2. Stock turns... inventory manament
    By johnnyd2 in forum Excel General
    Replies: 1
    Last Post: 11-26-2014, 08:39 PM
  3. [SOLVED] Return when a colomn turns and stays negative
    By JanLP in forum Excel General
    Replies: 6
    Last Post: 06-27-2014, 04:45 AM
  4. [SOLVED] How To Set a MAX Value, But when Exceeded Turns Negative
    By garrett.grillo in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 05-04-2014, 10:07 PM
  5. [SOLVED] Negative stock summary
    By makinmomb in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 04-25-2014, 03:18 PM
  6. [SOLVED] Having two date return number but exclude negative numbers
    By redjayhawk11 in forum Excel General
    Replies: 5
    Last Post: 12-31-2013, 06:34 AM
  7. Identify the earliest expiry date on stock based on current stock levels
    By julie86xx in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-10-2013, 01:08 AM

Tags for this Thread

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