+ Reply to Thread
Results 1 to 2 of 2

Find the date that zero stock starts and count for how many days was zero stock

  1. #1
    Registered User
    Join Date
    06-15-2012
    Location
    Greece
    MS-Off Ver
    Excel 2007
    Posts
    85

    Find the date that zero stock starts and count for how many days was zero stock

    Hi all.

    What i have is this.

    In row 2 we have different dates.

    In first column we have a list of products. Then we have quantities numbers, for eatch day. Some of these are zero as in these days stock was 0.

    Our goal is to find:

    The date that start the maximum zero stock and count the dates for this.

    My sample sheet shows exactly what i need and also expected results.

    Thanks in advance for any suggestion.
    Attached Files Attached Files

  2. #2
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Find the date that zero stock starts and count for how many days was zero stock

    hi apla. try these array formulas. in P3:
    =MAX(FREQUENCY(IF(B3:N3=0,COLUMN(B3:N3)),IF(B3:N3<>0,COLUMN(B3:N3)-COLUMN(B3)+1)))

    in O3:
    =INDEX($B$2:$N$2,MAX(IF(COUNTIF(OFFSET(B3,,COLUMN(B3:N3)-COLUMN(B3),,P3),0)=P3,COLUMN(B3:N3)-COLUMN(B3)+1)))

    ...both confirmed by pressing CTRL-SHIFT-ENTER to activate the array. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL-SHIFT-ENTER you will get an error or a clearly incorrect answer. Press F2 on that cell and try again.

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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