+ Reply to Thread
Results 1 to 3 of 3

How to return the first non-zero member in an arrray?

Hybrid View

swk98s17 How to return the first... 12-12-2007, 03:41 PM
Leith Ross Hello swk98s17, There are... 12-12-2007, 07:44 PM
shg =INDEX(A1:A10, MATCH(TRUE,... 12-13-2007, 12:35 AM
  1. #1
    Registered User
    Join Date
    12-12-2007
    Posts
    1

    How to return the first non-zero member in an arrray?

    Hi as per topic, pls help!

    Thanks,
    Wee Keong

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,259
    Hello swk98s17,

    There are no intrinsic array functions to this. You will have to loop through the array elements and check each one. When you find a zero element then exit the loop.

    Sincerely,
    Leith Ross

  3. #3
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689
    =INDEX(A1:A10, MATCH(TRUE, A1:A10<>0, 0))

    ... entered as an array formula (confirmed with Ctrl+Shift+Enter instead of Enter), and adjust range as required.
    Last edited by shg; 12-13-2007 at 12:38 AM.

+ 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