+ Reply to Thread
Results 1 to 6 of 6

Displaying the one with the highest "priority" among all matched instances

  1. #1
    Registered User
    Join Date
    11-14-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    Question Displaying the one with the highest "priority" among all matched instances

    (Pardon my poor English)

    Say, I got the following data:
    Col 1
    Col 2
    A
    S839
    B
    S323
    B
    B092
    C
    K293
    B
    G201
    C
    S323
    And say, the strings in column 2 have the following priorities:
    (highest)
    1 - S839
    2 - B092
    3 - S323
    4 - G201
    5 - K293
    (lowest)

    Now what I want is to get the string with the highest priority from column 2, while at the same time, matching a certain value in column 1.
    (e.g. in another spreadsheet)
    Col 1
    Col 2
    B
    B092
    C
    S323
    Any idea??
    Thanks in advance.

  2. #2
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Displaying the one with the highest "priority" among all matched instances

    Formula goes like that
    =INDEX($G$1:$G$5,SMALL(IFERROR(MATCH(IF(J1=$A$1:$A$6,$B$1:$B$6),$G$1:$G$5,0),999),1))
    Array formula

    Attached the file. You will understand clearly then. Desired outcomes are in yellow cells
    Attached Files Attached Files

  3. #3
    Registered User
    Join Date
    11-14-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Displaying the one with the highest "priority" among all matched instances

    Quote Originally Posted by eisayew View Post
    Formula goes like that
    =INDEX($G$1:$G$5,SMALL(IFERROR(MATCH(IF(J1=$A$1:$A$6,$B$1:$B$6),$G$1:$G$5,0),999),1))
    Array formula

    Attached the file. You will understand clearly then. Desired outcomes are in yellow cells
    Thank you so much for the reply.
    But would you mind saving the excel file in 2003 format?

  4. #4
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Displaying the one with the highest "priority" among all matched instances

    Quote Originally Posted by dyuk View Post
    Thank you so much for the reply.
    But would you mind saving the excel file in 2003 format?
    There is IFERROR formula which excel 2003 does not recognize it. You can replace iferror with =IF(ISERROR(),"FORMULA if TRUE","Formula if FALSE")

  5. #5
    Registered User
    Join Date
    10-02-2012
    Location
    Baku
    MS-Off Ver
    Excel 2010
    Posts
    273

    Re: Displaying the one with the highest "priority" among all matched instances

    Formula for Excel 2003 most probably will be like that
    =INDEX($G$1:$G$5,SMALL(IF(ISERROR(MATCH(IF(J1=$A$1:$A$6,$B$1:$B$6),$G$1:$G$5,0)),999,MATCH(IF(J1=$A$1:$A$6,$B$1:$B$6),$G$1:$G$5,0)),1))

  6. #6
    Registered User
    Join Date
    11-14-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    11

    Re: Displaying the one with the highest "priority" among all matched instances

    Quote Originally Posted by eisayew View Post
    Formula for Excel 2003 most probably will be like that
    =INDEX($G$1:$G$5,SMALL(IF(ISERROR(MATCH(IF(J1=$A$1:$A$6,$B$1:$B$6),$G$1:$G$5,0)),999,MATCH(IF(J1=$A$1:$A$6,$B$1:$B$6),$G$1:$G$5,0)),1))
    It works perfectly! Thank you so much.

+ 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