+ Reply to Thread
Results 1 to 7 of 7

Return last column index greater than zero

Hybrid View

  1. #1
    Registered User
    Join Date
    12-01-2008
    Location
    London
    Posts
    25

    Return last column index greater than zero

    Hello Forum

    Hope this is a quick fix - I have been struggling with the worksheet functions INDEX/OFFSET to get the answer I need but cannot get the formula right. At least I think it is a combination of more than one function?

    Basically I want to return the last development year for a rows of data that I have.

    So in the first example in cell A3 I want to see 13 as the answer - not 17 (I have to leave the all the zeros in).

    In cell A4 I want to see 8 as the answer - again, not 17.

    Many thanks Forum.
    denise
    Attached Files Attached Files
    Last edited by denise001; 09-20-2010 at 07:16 AM.

  2. #2
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Do I need a Combination of INDEX/OFFSET Formula?

    Try:

    =LOOKUP(2,1/($B3:$R3>0),$B$2:$R$2)

    copied down.
    Where there is a will there are many ways.

    If you are happy with the results, please add to the contributor's reputation by clicking the reputation icon (star icon) below left corner

    Please also mark the thread as Solved once it is solved. Check the FAQ's to see how.

  3. #3
    Registered User
    Join Date
    12-01-2008
    Location
    London
    Posts
    25

    Re: Return last column index greater than zero

    Thanks you so much NBVC.
    That is perfect - problem solved - and I have learnt something - I was getting very close as well.
    (I will be making a donation via paypal to one of your listed charities)
    best regards

  4. #4
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Return last column index greater than zero

    That's great! Thanks.

  5. #5
    Registered User
    Join Date
    07-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Return last column index greater than zero

    NBVC.... how about if I needed to find the opposite.... so the first column that is greater than 0.

    So using densie001 work sheet the answers would be.....

    a3 = 2
    a4 = 2
    a5 = 2
    a6 = 1
    a7 = 1

    Cheers Mark

  6. #6
    Forum Expert NBVC's Avatar
    Join Date
    12-06-2006
    Location
    Mississauga, CANADA
    MS-Off Ver
    2003:2010
    Posts
    34,898

    Re: Return last column index greater than zero

    That would be:

    =INDEX($B$2:$R$2,MATCH(TRUE,INDEX($B3:$R3<>0,0),0))

  7. #7
    Registered User
    Join Date
    07-16-2011
    Location
    Australia
    MS-Off Ver
    Excel 2003
    Posts
    7

    Re: Return last column index greater than zero

    Quote Originally Posted by NBVC View Post
    That would be:

    =INDEX($B$2:$R$2,MATCH(TRUE,INDEX($B3:$R3<>0,0),0))
    NBVC, you have done a superb job.... THANK YOU!

+ 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