+ Reply to Thread
Results 1 to 4 of 4

Finding first instance in an array

  1. #1
    Registered User
    Join Date
    02-27-2008
    Posts
    3

    Finding first instance in an array

    Hi all,

    A colleague of mine has an issue where he is trying to find and return the first instance of a non 0 in an array of ca60 cells.

    At first we thought he may be able to use an nested if statement. but it appears that there are too many cells to be able to do this.

    Does anyone know of an elegant solution that we could use?

    Many thanks,
    Rich

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

    =INDEX(A1:A60,MATCH(TRUE,A1:A60>0,0))

    adjust ranges to suit and confirm the formula with CTRL+SHIFT+ENTER not just ENTER...you will see { } brackets appear around the formula.
    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
    02-27-2008
    Posts
    3
    I've passed your suggestion on, many thanks.
    Rich

  4. #4
    Registered User
    Join Date
    02-27-2008
    Posts
    3
    That worked a treat.

    Thanks.

    Rich

+ 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