+ Reply to Thread
Results 1 to 9 of 9

Index, match, array formula.

  1. #1
    Registered User
    Join Date
    09-13-2016
    Location
    Korea
    MS-Off Ver
    2013
    Posts
    11

    Index, match, array formula.

    I have this formula

    {=INDEX(Table2[A],MATCH($B$1&$C$1,Table2[B]&Table2[C],0))}

    It works as I expected, giving me the correct value from Table2[A]. With this example there is only 1 correct match.

    With my next Table, there are 10 correct matches. I want to display all 10 matches in a Table. I keep trying to add in the ROWS function to this formula, but it messes it up.

    Any help would be appreciated.
    Attached Files Attached Files
    Last edited by hurrell8510; 08-20-2017 at 11:14 AM.

  2. #2
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Index, match, array formula.

    You get better help on your question if you add a small excel file, without confidential information.

    Please also add manualy the expected result in your file.

    To Attach a File:

    1. Scroll down to the window below your post Additional Options
    2. In the frame Attach Files you will see the button Manage Attachments
    3. Click the button.
    4. A new window will open titled Manage Attachments - Excel Forum.
    5. Click the Browse... button to locate your file for uploading.
    6. This will open a new window File Upload.
    7. Once you have located the file to upload click the Open button. This window will close.
    8. You are now back in the Manage Attachments - Excel Forum window.
    9. Click the Upload button and wait until the file has uploaded.
    10. Close the window and then click Submit.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  3. #3
    Registered User
    Join Date
    09-13-2016
    Location
    Korea
    MS-Off Ver
    2013
    Posts
    11

    Re: Index, match, array formula.

    Okay, I will re-post later. I will recreate the problem in a new sheet, without confidential information. Thank you for you advise, it is appreciated.

  4. #4
    Registered User
    Join Date
    09-13-2016
    Location
    Korea
    MS-Off Ver
    2013
    Posts
    11

    Re: Index, match, array formula.

    Okay, I have added a file that is much simplified, but shows what I would like to do.

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

    Re: Index, match, array formula.

    Try this:

    =IFERROR(INDEX(Table2[Winners],SMALL(IF(Table2[Year]=$C$1,IF(Table2[Month]=$B$1,ROW(Table2[Winners]))),ROWS($A$1:A1))-1),"")

    ... confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Once entered, drag copy down.
    Ali


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

    Forum Rules (updated August 2023): please read them here.

  6. #6
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Index, match, array formula.

    With a pivot table.

  7. #7
    Registered User
    Join Date
    09-13-2016
    Location
    Korea
    MS-Off Ver
    2013
    Posts
    11

    Re: Index, match, array formula.

    Quote Originally Posted by AliGW View Post
    Try this:

    =IFERROR(INDEX(Table2[Winners],SMALL(IF(Table2[Year]=$C$1,IF(Table2[Month]=$B$1,ROW(Table2[Winners]))),ROWS($A$1:A1))-1),"")

    ... confirmed by pressing CTRL+SHIFT+ENTER to activate the array, not just ENTER. You will know the array is active when you see curly braces { } appear around your formula. If you do not CTRL+SHIFT+ENTER you will get an error or a clearly incorrect answer. Once entered, drag copy down.
    Thank you, it was perfect in the simplified version, and a little bit of editing made it perfect in the original. Thank you for taking the time to solve that.

    Out of interest, if it isn't to much trouble, could you let me know why you got rid of MATCH. Was MATCH wrong for how I wanted to expand the formula? Or was it just that you prefer using IF? Or was it because IF is just a more streamlined approach?

    Either way, many thanks

  8. #8
    Registered User
    Join Date
    09-13-2016
    Location
    Korea
    MS-Off Ver
    2013
    Posts
    11

    Re: Index, match, array formula.

    Quote Originally Posted by oeldere View Post
    With a pivot table.
    Thank you for attempting to find a solution, but the pivot table would not by functional in the real spreadsheet.

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

    Re: Index, match, array formula.

    It's just a case of what is the right approach for the job. This is the formula I have learnt for extracting a subset of a list. I just added it to my portfolio and use it as appropriate! There may be a way with MATCH, as there is often more than one way to skin a cat.

+ 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: 3
    Last Post: 04-02-2016, 08:16 PM
  2. Index and match array formula
    By [email protected] in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-08-2015, 12:06 PM
  3. Replies: 6
    Last Post: 04-30-2014, 02:42 AM
  4. [SOLVED] Index and Match array formula - Help with this?
    By SwtSinSation in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-25-2014, 09:51 AM
  5. Index, Match, Min, If, And in one Array formula
    By Skybeau in forum Excel General
    Replies: 1
    Last Post: 07-18-2012, 01:03 AM
  6. Nested Match(index()) vs. Match() array formula.
    By GeneralDisarray in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2011, 07:57 AM
  7. [SOLVED] Index and Match Array formula
    By Graham Haughs in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-15-2006, 09:55 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