+ Reply to Thread
Results 1 to 4 of 4

Look across array and return non-zero values sequentially

  1. #1
    Registered User
    Join Date
    10-10-2012
    Location
    London
    MS-Off Ver
    Excel 2003
    Posts
    4

    Look across array and return non-zero values sequentially

    Hi -

    Probably best explained by way of example. Please see attached.

    Many thanks in advance.
    Mohammed.
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: Look across array and return non-zero values sequentially

    use this array formula in B10, copied across and down:
    =IFERROR(INDEX(3:3,SMALL(IF($B3:$M3>0,COLUMN($B3:$M3)),COLUMNS($B10:B10))),"")

    Array Formulae are a little different from ordinary formulae in that they MUST be confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER.

    You will know the array is active when you see curly brackets { } - or "curly braces" for those of you in the USA, or "flower brackets" for those of you in India - appear around the outside of your formula. If you do not use CTRL+SHIFT+ENTER you will (almost always) get an error message or an incorrect answer. Press F2 on that cell and try again.

    Don't type the curly brackets yourself - it won't work...
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  3. #3
    Forum Guru
    Join Date
    02-27-2016
    Location
    Vietnam
    MS-Off Ver
    2024
    Posts
    6,175

    Re: Look across array and return non-zero values sequentially

    Try this in B10:

    =IF(COLUMNS($B10:B10)>COUNTIF($B3:$M3,">0"),"",INDEX(3:3,SMALL(IF($B3:$M3>0,COLUMN($B3:$M3),""),COLUMNS($B10:B10))))

    Enter with Ctrl+Shift+Enter.

    Copy cross and down.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Look across array and return non-zero values sequentially

    What version of Excel does this have to work in?

    Your profile says you're using Excel 2003 but the sample file is in the *.xlsx format which requires Excel 2007 or later.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

+ 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. [SOLVED] Return multiple values from an array
    By tig1142 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 12-27-2013, 08:31 PM
  2. Need to search array and return value along with title and row values
    By wilburr in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 09-28-2013, 06:01 AM
  3. Replies: 8
    Last Post: 08-22-2013, 07:00 AM
  4. [SOLVED] Return values from an array
    By JungleJme in forum Excel General
    Replies: 2
    Last Post: 06-25-2012, 05:14 AM
  5. Array formula to return Max values or zero
    By Motox in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 02-17-2012, 09:18 PM
  6. Find a value in an array and return multiple values in an adjacent array
    By tonbra in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-02-2012, 08:35 PM
  7. Store cell values in an array and return values on specific condition
    By gmalpani in forum Excel - New Users/Basics
    Replies: 7
    Last Post: 11-27-2011, 06:43 AM
  8. Use array to return array of values
    By Brad in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-30-2006, 01:00 PM

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