+ Reply to Thread
Results 1 to 6 of 6

Lookup the first non zero value of a row in a range and return it.

  1. #1
    Registered User
    Join Date
    06-06-2010
    Location
    Hong Kong
    MS-Off Ver
    2016 for Mac
    Posts
    28

    Lookup the first non zero value of a row in a range and return it.

    Hi,

    Anyone can help me with this one?
    I would like to achieve 2 things. Hopefully the attachment is clear.

    a) lookup and return the first non zero value of a row in a range, in the example: e.g.: lookup aa in the range and return 5 (the first non zero value)
    b) lookup and return the column header (row 1) of the first non zero value in that same range: e.g.: lookup aa in the range and return vv (column header of the first non zero value)

    Thanks in advance guys. Much appreciated.
    Attached Files Attached Files

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Lookup the first non zero value of a row in a range and return it.

    Here, try this:

    Edit: Sorry, you wrote first non-zero value. I've return last.
    Let me fix it.
    Attached Files Attached Files

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Lookup the first non zero value of a row in a range and return it.

    Here are both versions.

    aa has different input so choose output that give you desired result.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    06-06-2010
    Location
    Hong Kong
    MS-Off Ver
    2016 for Mac
    Posts
    28

    Re: Lookup the first non zero value of a row in a range and return it.

    Thanks a lot man !! Works like a charm.

    Much appreciated.

  5. #5
    Forum Expert newdoverman's Avatar
    Join Date
    02-07-2013
    Location
    Port Dover, Ontario, Canada
    MS-Off Ver
    2010
    Posts
    10,330

    Re: Lookup the first non zero value of a row in a range and return it.

    Here is one way of doing this.

    First non 0:
    Array enter (Ctrl + Shift + Enter)
    Formula: copy to clipboard
    Please Login or Register  to view this content.


    Column Header:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    <---------If you like someone's answer, click the star to the left of one of their posts to give them a reputation point for that answer.
    Ron W

  6. #6
    Registered User
    Join Date
    06-06-2010
    Location
    Hong Kong
    MS-Off Ver
    2016 for Mac
    Posts
    28

    Re: Lookup the first non zero value of a row in a range and return it.

    And this one is good too !! Thanks for that.

+ 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. Replies: 4
    Last Post: 05-22-2013, 04:15 AM
  2. [SOLVED] lookup date in range and return value
    By SAsplin in forum Excel General
    Replies: 3
    Last Post: 05-14-2012, 06:46 AM
  3. Lookup trying to return a value out of range
    By chcwebb in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-19-2009, 06:46 PM
  4. [SOLVED] Lookup &amp;amp; Return Range of Data
    By shehasclass in forum Excel General
    Replies: 2
    Last Post: 04-06-2006, 11:20 AM
  5. [SOLVED] lookup and return range of cells
    By Duke Carey in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 07:05 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