+ Reply to Thread
Results 1 to 4 of 4

Having trouble making a function that returns multiple values for index match.

  1. #1
    Registered User
    Join Date
    07-12-2019
    Location
    Minneapolis MN
    MS-Off Ver
    2016
    Posts
    2

    Having trouble making a function that returns multiple values for index match.

    Currently trying to create an index function that returns multiple values horizontally. Currently when I run this formula using ctrl + shift + enter I get an #N/A

    Current formula: =INDEX($B$2:$B$150, SMALL(IF(A$2=$C$2:$C$150, ROW($C$2:$C$150)-MIN(ROW($C$2:$C$150))+1, ""), COLUMN(A1)))


    Ideally cell D2 would be cgsteen
    Attached Files Attached Files
    Last edited by bhlynch98; 07-12-2019 at 11:47 AM.

  2. #2
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Ipswich, Suffolk (England), but grew up in Sawley, Derbyshire
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2301 (Windows 11 22H2 64-bit)
    Posts
    65,649

    Re: Having trouble making a function that returns multiple values for index match.

    Welcome to the forum.

    Will you please attach a sample Excel workbook? We are not able to work with or manipulate a picture of one and nobody wants to have to recreate your data from scratch.

    1. Make sure that your sample data are REPRESENTATIVE of your real data. The use of unrepresentative data is very frustrating and can lead to long delays in reaching a solution.

    2. Make sure that your desired results are also shown (mock up the results manually).

    3. Make sure that all confidential data is removed or replaced with dummy data first (e.g. names, addresses, E-mails, etc.).

    4. Try to avoid using merged cells as they cause lots of problems.

    Unfortunately the attachment icon doesn't work at the moment, so to attach an Excel file you have to do the following: just before posting, scroll down to Go Advanced and then scroll down to Manage Attachments. Now follow the instructions at the top of that screen.

    Please pay particular attention to point 2 (above): without an idea of your intended outcomes, it is often very difficult to offer appropriate advice.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" to anyone who has offered you help in your thread. You can reward them by clicking on * Add Reputation below theur user name on the left, if you wish.


    Forum Rules (updated September 2018): please read them here.
    How to use the Power Query code you've been given: help here. More about the Power suite here.

  3. #3
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16/365
    Posts
    52,318

    Re: Having trouble making a function that returns multiple values for index match.

    1. I think you meant vertically (up-and-down), rather than horizontally (side-to-side)?
    2. Delete/fix the errors in the lower part of your table.
    3. why would cell D2 = cgsteen? A2 = EB-101 and it's 1st match is in row 94 - helle029
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 2000/3/7/10/13/16/365
    Posts
    52,318

    Re: Having trouble making a function that returns multiple values for index match.

    Also, if your references in col A are unique (which your sample indicates), why are you using a complex ARRAY functoin for that, when a simple INDEX/MATCH will do the job?
    D2=IFERROR(INDEX(B:B,MATCH(A2,C:C,0)),"")
    copied down

+ 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. Index Match function returns #NA
    By limpfisch in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-13-2018, 11:39 AM
  2. Index Match that returns all non zero values in row
    By kvarner in forum Excel Formulas & Functions
    Replies: 44
    Last Post: 03-03-2016, 06:41 PM
  3. [SOLVED] Index+Match+Match doesnt returns right values
    By SwissExcel in forum Excel General
    Replies: 10
    Last Post: 07-21-2015, 08:39 AM
  4. Replies: 1
    Last Post: 06-10-2015, 12:56 PM
  5. Index Match Function Multiple Values
    By mpagliaro in forum Excel General
    Replies: 3
    Last Post: 03-10-2015, 10:29 AM
  6. [SOLVED] Making a Dynamic Invoice That looks up a value and returns multiple corresponding values
    By david_j_p in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-10-2013, 01:40 AM
  7. INDEX(...MATCH(IF...))) Function trouble
    By reaper_2 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 07-25-2011, 02:19 AM

Tags for this Thread

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