+ Reply to Thread
Results 1 to 8 of 8

Count-back "x" number of cells from when value goes negative

Hybrid View

  1. #1
    Registered User
    Join Date
    10-20-2015
    Location
    NYC
    MS-Off Ver
    2013
    Posts
    3

    Count-back "x" number of cells from when value goes negative

    I am running a basic demand planning worksheet, which decrements inventory and uses conditional formatting to identify when inventory will run out. Now, I am looking for a way to identify the "Order Date" to place new PO's based on the number of days in the "Leadtime"(C2:C5) field. Any ideas?

    Thanks
    Attached Files Attached Files

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

    Re: Count-back "x" number of cells from when value goes negative

    Not very clear on your request, but this formula returns the first date that row #2 goes negative:

    =LOOKUP(0,-D2:CE2,$D$1:$CE$1)+1

    And 10 days earlier:

    =LOOKUP(0,-D2:CE2,$D$1:$CE$1)-9

    with stock are decreasing like example.
    Quang PT

  3. #3
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Count-back "x" number of cells from when value goes negative

    Try

    =INDEX($D$1:$CE$1,MATCH(0,$D2:$CE2,-1))-$C2

    You may need to add +1 to the end depending on which date you want to begin the counting from (Date it turned negative, or last date it was still positive)
    This begins the count on the last day it was positive.

  4. #4
    Registered User
    Join Date
    10-20-2015
    Location
    NYC
    MS-Off Ver
    2013
    Posts
    3

    Re: Count-back "x" number of cells from when value goes negative

    Nevermind, it was just formatting....Got it.

    Thanks for the help!

  5. #5
    Registered User
    Join Date
    10-20-2015
    Location
    NYC
    MS-Off Ver
    2013
    Posts
    3

    Re: Count-back "x" number of cells from when value goes negative

    Thanks for the lp. Next question will probably make me seem even more incompetent...

    When I try using these in conditional formatting it just highlights all values, which clearly isn't working. WHen I enter the formula into a cell on it's own it returns a value of 42330(johnmo1) and 42331(bebo).

    Am I just using the formulas you provided incorrectly? I apologize for my ignorance here. Thanks in advance for any further help

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

    Re: Count-back "x" number of cells from when value goes negative

    OK, nice to hear it works.

  7. #7
    Forum Guru Jonmo1's Avatar
    Join Date
    03-08-2013
    Location
    Bryan, TX
    MS-Off Ver
    Excel 2010
    Posts
    9,763

    Re: Count-back "x" number of cells from when value goes negative

    You're welcome.

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

    Re: Count-back "x" number of cells from when value goes negative

    jommo suplies last positive date, mine is first negative date, which is belong to your decision.
    About formatting, can you re-upload again with new CF applied?

+ 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. [SOLVED] Count number of rows in a range that contain less than 5 cells with the string "VAC"
    By bananius in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-25-2014, 03:58 PM
  2. Replies: 3
    Last Post: 01-02-2014, 02:15 PM
  3. [SOLVED] How to USE """"" cells count """"" change font color
    By austin123456 in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 10-09-2013, 06:14 AM
  4. [SOLVED] Count the number of cells over 35 days excluding rows/cells that have a "yes" value
    By northcoms in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 07-02-2013, 10:25 AM
  5. Replies: 18
    Last Post: 11-04-2012, 06:32 PM
  6. [SOLVED] How to Count number of "Error" and "OK" after the word "Instrument" found in table row
    By eltonlaw in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-17-2012, 06:26 AM
  7. Replies: 11
    Last Post: 04-25-2012, 01:42 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