+ Reply to Thread
Results 1 to 9 of 9

Help with Array Function: Avoid repeating values on MATCH/INDEX

  1. #1
    Registered User
    Join Date
    12-05-2014
    Location
    NY, NY
    MS-Off Ver
    2013
    Posts
    7

    Help with Array Function: Avoid repeating values on MATCH/INDEX

    I've gone through a couple similar posts but, have trouble applying the concepts to my case which is attached to this post.

    I have a large table that I applied a match/index to extract the top ten rows. The formula for my top ten is as follows (found in cell AB174):

    =INDEX($M$174:$M$447,MATCH(AE174,$X$174:$X$447, 0))

    As you can imagine, when I have repeating values in the X column, the function reads only the first matching value in the M column. I need to compensate for repetition. This is where I know an array function will come into play.

    I pulled another array function from a similar thread that I think correlates with my problem but, I cannot successfully apply it to my case. It originally reads as follows:

    =IFERROR(INDEX($B$2:$M$45,SMALL(IF($A$2:$A$45=$O$2,ROW($A$2:$A$45)-ROW($A$2)+1),ROWS(A$1:A1)),MATCH($O$4,$B$1:$M$1,0)),"")

    Please helpme apply an array to avoid repetition!
    Attached Files Attached Files

  2. #2
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Help with Array Function: Avoid repeating values on MATCH/INDEX

    Hi.

    You could add a small differentiator to all of your formulas, e.g. in AB174:

    =INDEX($M$174:$M$447,MATCH(AE174,$X$174:$X$447+ROW($X$174:$X$447)/10^6, 0))

    And, in AE174:

    =LARGE($X$174:$X$447+ROW($X$174:$X$447)/10^6, Z174)

    though note that these are now necessarily array formulas**.

    Regards


    **Array formulas are not entered in the same way as 'standard' formulas. Instead of pressing just ENTER, you first hold down CTRL and SHIFT, and only then press ENTER. If you've done it correctly, you'll notice Excel puts curly brackets {} around the formula (though do not attempt to manually insert these yourself).
    Click * below if this answer helped

    Advanced Excel Techniques: http://excelxor.com/

  3. #3
    Registered User
    Join Date
    12-05-2014
    Location
    NY, NY
    MS-Off Ver
    2013
    Posts
    7

    Re: Help with Array Function: Avoid repeating values on MATCH/INDEX

    This worked. Thanks.

    Unfortunately, I just found out the program I'm using in conjunction with excel can not interpret array functions. is there any other way to avoid repeating values without array functions?

  4. #4
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Help with Array Function: Avoid repeating values on MATCH/INDEX

    If by that you mean formulas which require CSE entry, use instead (in AB74):

    =INDEX($M$174:$M$447,MATCH(AE174,INDEX($X$174:$X$447+ROW($X$174:$X$447)/10^6,,),0))

    etc.

    Regards

  5. #5
    Registered User
    Join Date
    12-05-2014
    Location
    NY, NY
    MS-Off Ver
    2013
    Posts
    7

    Re: Help with Array Function: Avoid repeating values on MATCH/INDEX

    Right, no CSE entry on AB174.

    A pure copy/paste of the formula you supplied yeilds a "#N/A" readout. I'll see if I can troubleshoot the issue.

  6. #6
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Help with Array Function: Avoid repeating values on MATCH/INDEX

    On my browser what I pasted does not appear in its entirety at the current zoom level.

    Just a chance, but did you ensure you copied it all?

    Perhaps re-post your attachment with your attempt at pasting it in.

    Regards

  7. #7
    Registered User
    Join Date
    12-05-2014
    Location
    NY, NY
    MS-Off Ver
    2013
    Posts
    7

    Re: Help with Array Function: Avoid repeating values on MATCH/INDEX

    Seems like I'm getting the entire formula. I've also attached my spreadsheet again with your value in AB174.

    =INDEX($M$174:$M$447,MATCH(AE174,INDEX($X$174:$X$447+ROW($X$174:$X$447)/10^6,,),0))
    Attached Files Attached Files

  8. #8
    Forum Expert XOR LX's Avatar
    Join Date
    04-18-2013
    Location
    Turin, Italy
    MS-Off Ver
    Office 365
    Posts
    7,742

    Re: Help with Array Function: Avoid repeating values on MATCH/INDEX

    Ah, but of course this formula relies on the result of that in column AE, so you need to have that one in correctly as well!

    Regards

  9. #9
    Registered User
    Join Date
    12-05-2014
    Location
    NY, NY
    MS-Off Ver
    2013
    Posts
    7

    Re: Help with Array Function: Avoid repeating values on MATCH/INDEX

    Yes, but this will cause me to use the CSE function for column AE you specified earlier. I need to avoid CSE entirely. Sorry if I wasn't clear before.

+ 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. Returning multiple distinct/repeating values for vlookup or index-match
    By amatvien in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 08-21-2018, 01:14 PM
  2. Index and Match function across multiple rows with repeating names
    By FKOC in forum Excel Formulas & Functions
    Replies: 12
    Last Post: 06-09-2014, 11:17 PM
  3. index function error using match function to get data from a cell in an array
    By mabildgaard in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 10-17-2013, 02:21 AM
  4. Use Index/Match Function to Return Values from an Array
    By 00pumpkin in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 10-11-2013, 02:22 PM
  5. Index/Match for Repeating Values in 2007
    By jetsfan23 in forum Excel General
    Replies: 2
    Last Post: 11-15-2010, 04:09 PM

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