+ Reply to Thread
Results 1 to 3 of 3

Retrieve first to nth non zero values in row and corresponding date from another row

  1. #1
    Registered User
    Join Date
    11-01-2012
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Retrieve first to nth non zero values in row and corresponding date from another row

    Hi, I am new to this forum but would appreciate your help.

    I have a range of data in a row spanning lots of columns and would like to identify the first to nth non zero values (in the order they are presented from left to right), where n = the total number of non zero values in the range. The data set is dynamic, the values may or may not be unique and the last value is not always non zero.
    Once I have the non zero values, I also want to identify the corresponding dates in which the values occur. Worth noting that the "year" row and the "values" row may be quite far apart from each other.

    For example:

    Year 2012 2013 2014 2015 2016 2017
    Values 0 -50 -50 -30 0 -75

    Intended result (in two or three columns)

    first entry: -50 2013
    second entry: -50 2014
    third entry: -30 2015
    fourth entry: -75 2017

    I have used countif to find "n" (in this example 4) and match/index to find the first non zero value. How do I adapt the formula to get the second, third and fourth entries? I don't want to use a macro.

    Thanks

  2. #2
    Forum Contributor
    Join Date
    09-23-2008
    Location
    Mexico
    Posts
    200

    Re: Retrieve first to nth non zero values in row and corresponding date from another row

    Maybe:
    http://prakashgusain.blogspot.mx/201...4th-value.html

  3. #3
    Registered User
    Join Date
    11-01-2012
    Location
    UK
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Retrieve first to nth non zero values in row and corresponding date from another row

    FORUM help.xlsx

    Thanks. That's not quite what I'm looking for as my data set is already quite large and would prefer to avoid a "mask". attached is the problem in excel if its helpful.

+ 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