+ Reply to Thread
Results 1 to 3 of 3

lookup nonzerovalues

  1. #1
    DAVID
    Guest

    lookup nonzerovalues

    I have two columns A and B. Column A contains ascending numbers from 1 to
    100, column B contains arbitrary values (not in ascending order). What is the
    function that looks for the first nonzero value in column B (going from the
    frist to the last row) and returns the value of column A of the same row?

  2. #2
    JulieD
    Guest

    Re: lookup nonzerovalues

    Hi David

    =INDEX($A$1:$B$1000,SMALL(IF($B$1:$B$1000<>0,ROW($B$1:$B$1000),""),1),1)

    entered using control & shift & enter not just enter

    Cheers
    JulieD

    "DAVID" <[email protected]> wrote in message
    news:[email protected]...
    >I have two columns A and B. Column A contains ascending numbers from 1 to
    > 100, column B contains arbitrary values (not in ascending order). What is
    > the
    > function that looks for the first nonzero value in column B (going from
    > the
    > frist to the last row) and returns the value of column A of the same row?




  3. #3
    Dave Peterson
    Guest

    Re: lookup nonzerovalues

    Another one:

    =INDEX($A$1:$A$1000,MATCH(TRUE,$B$1:$B$1000<>0,0))
    Still hit ctrl-shift-enter with this array formula.

    Change that 1000 to be as big as you need, but you can't use the whole column.

    DAVID wrote:
    >
    > I have two columns A and B. Column A contains ascending numbers from 1 to
    > 100, column B contains arbitrary values (not in ascending order). What is the
    > function that looks for the first nonzero value in column B (going from the
    > frist to the last row) and returns the value of column A of the same row?


    --

    Dave Peterson

+ 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