+ Reply to Thread
Results 1 to 6 of 6

Using Index for Multiple Returns from an array

  1. #1
    Registered User
    Join Date
    06-29-2016
    Location
    England
    MS-Off Ver
    Office 2015
    Posts
    9

    Using Index for Multiple Returns from an array

    Hi everyone, first post !!

    I've got an excel sheet that consists of an array of national holidays. They are sorted by month with the first column being the month name, second column description of the event, and third is the exact date.

    What I'd like to do is to pull all of the values from January, returning both the description and exact date.

    =IF(ISERROR(INDEX($G$2:$G$27,SMALL(IF($G$2:$G$27=$G$34,ROW($G$1:$G$27)),ROW(1:1)),2)),"",INDEX($G$27:$H$27,SMALL(IF($G$2:$G$27=$G$34,ROW($G$2:$G$27)),ROW(1:1)),2))

    Is the formula I'm using.

    Array is G2 : G27

    G34 holds the month I'm looking for

    Column G is the Month,
    Column H is Description
    Column I is the Exact Date

    I will take it if I can even just get the description returned.

    I know how to use ctrl shift & enter for an array formula, and that I need to paste this down for how many rows to show each entry, but I'm totally lost here !!

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

    Re: Using Index for Multiple Returns from an array

    Maybe this...

    =IFERROR(INDEX($G:$G,SMALL(IF($G$2:$G$27=$G$34,ROW(G$2:G$27)),ROWS(A$1:A1))),"")

    Still array entered.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Forum Expert daffodil11's Avatar
    Join Date
    07-11-2013
    Location
    Phoenixville, PA
    MS-Off Ver
    MS Office 2016
    Posts
    4,465

    Re: Using Index for Multiple Returns from an array

    Your inputs and outputs need to have the same dimensions.

    Adjust the ROW output of your IF statements to have 26 cells.
    Make Mom proud: Add to my reputation if I helped out!

    Make the Moderators happy: Mark the Thread as Solved if your question was answered!

  4. #4
    Forum Expert
    Join Date
    05-05-2015
    Location
    UK
    MS-Off Ver
    Microsoft Excel for Microsoft 365 MSO (Version 2402 Build 16.0.17328.20068) 64-bit
    Posts
    28,215

    Re: Using Index for Multiple Returns from an array

    TRY

    =IFERROR(INDEX($H$2:$H$27,SMALL(IF($G$2:$G$27=$G$34,ROW($G$2:$G$27)-row($G$2)+1,""),rows($g$2:g2))),"")

    =IFERROR(INDEX($I$2:$I$27,SMALL(IF($G$2:$G$27=$G$34,ROW($G$2:$G$27)-row($G$2)+1,""),rows($g$2:g2))),"")

    Enter both with Ctrl+Shift+Enter

    copy down

  5. #5
    Registered User
    Join Date
    06-29-2016
    Location
    England
    MS-Off Ver
    Office 2015
    Posts
    9

    Re: Using Index for Multiple Returns from an array

    JohnTopley,

    Excellent, that worked, but now I'm moving the results to a different location on the sheet, and it stops working...

    I've moved the Month in G34 to B34, amended the formula where it says $g$34 to $b$34, and it imediately stops working. Clearly I'm missing something from the mechanics of this ?

  6. #6
    Registered User
    Join Date
    06-29-2016
    Location
    England
    MS-Off Ver
    Office 2015
    Posts
    9

    Re: Using Index for Multiple Returns from an array

    Doh. Wasn't using the ctrl, shift and enter command to run array formula. Now to get it working from another sheet....

+ 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. Replies: 5
    Last Post: 05-18-2016, 04:50 AM
  2. Index Match with multiple returns from multiple spreadsheets
    By jmaggols in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 02-28-2016, 05:18 PM
  3. Replies: 13
    Last Post: 01-24-2016, 09:27 PM
  4. Sum of multiple Index Match returns!?
    By Spicey_888 in forum Excel General
    Replies: 6
    Last Post: 04-25-2015, 05:30 AM
  5. [SOLVED] Search array for a value, returns index location
    By smpita in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 06-24-2014, 05:36 PM
  6. One Index, Multiple Returns (one to many lookup)
    By brycewang in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-06-2010, 06:34 PM
  7. [SOLVED] Looking for formula index/match-type that returns an array
    By Tom in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 04-01-2005, 05:06 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