+ Reply to Thread
Results 1 to 8 of 8

Two-Dimensional Match function

Hybrid View

  1. #1
    Registered User
    Join Date
    01-16-2011
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2013
    Posts
    5

    Two-Dimensional Match function

    I've my data in the following format:
    Category Code 1 Code 2 Code 3
    A AB121 AN131
    B AB102 AB103 AN321
    A AD211

    What I want to do is basically return the "Category" based on the "Code". If the match() worked for 2-d arrays, this would be pretty simple but unfortunately it doesn't. Any suggestions?
    Attached Images Attached Images

  2. #2
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Two-Dimensional Match function

    Please upload example workbook.

    Write desired output and where you want it.

  3. #3
    Registered User
    Join Date
    01-16-2011
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Two-Dimensional Match function

    Hi,
    Please find attached the sample file.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    01-16-2011
    Location
    Mumbai, India
    MS-Off Ver
    Excel 2013
    Posts
    5

    Re: Two-Dimensional Match function

    I'm stuck with the same problem again. Any solutions?

  5. #5
    Forum Expert
    Join Date
    12-09-2014
    Location
    Trakai, Lithuania
    MS-Off Ver
    2016
    Posts
    1,299

    Re: Two-Dimensional Match function

    Can such a solution using AGGREGATE function will do.
    Formula: copy to clipboard
    =INDEX($A$17:$A$25,AGGREGATE(15,6,ROW(A$1:A$15)/($B$17:$E$25=A2),1))
    Attached Files Attached Files

  6. #6
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: Two-Dimensional Match function

    or try below formula
    =IFERROR(INDEX($A:$A,MIN(INDEX(($B$17:$E$25<>$A2)*10^10+ROW($B$17:$E$25),0))),"")
    Samba

    Say thanks to those who have helped you by clicking Add Reputation star.

  7. #7
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,627

    Re: Two-Dimensional Match function

    As long as your category is simple A, B, C..., Z then you can use CHAR.
    Attached Files Attached Files

  8. #8
    Forum Guru samba_ravi's Avatar
    Join Date
    07-26-2011
    Location
    Hyderabad, India
    MS-Off Ver
    Excel 2021
    Posts
    8,915

    Re: Two-Dimensional Match function

    b2=INDEX($A:$A,SUMPRODUCT(($B$17:$E$25=$A2)*ROW($B$17:$E$25)))
    try this and copy towards down

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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