+ Reply to Thread
Results 1 to 3 of 3

Match a value present in one of two columns and output a value in the matched row

  1. #1
    Registered User
    Join Date
    03-22-2013
    Location
    Sterling, VA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Match a value present in one of two columns and output a value in the matched row

    Blank cell is denoted by " ".

    I want to match the value in column 1 with the same value in either column 2 or 3. I would like to use the row of the matched result to output the value in column 4.

    What i have:

    A A B 123
    B C D 456
    C E " " 789
    D F G 987
    E H I 654
    F J K 321

    Desired outputRows 1-6 A-F are being matched)

    123
    123
    456
    456
    789
    987

    I've tried using the match and index functions but realized that match is only for one dimensional arrays. I worked it around several ways but a solution is escaping me right now. Any help would be appriceated. I think a VBA solution might be easier but i'm just starting to learn.

    Thanks

  2. #2
    Forum Guru Pete_UK's Avatar
    Join Date
    12-31-2011
    Location
    Warrington, England
    MS-Off Ver
    Office 2019 (still learning)
    Posts
    24,603

    Re: Match a value present in one of two columns and output a value in the matched row

    Try this in E1:

    =IF(A1="","",INDEX($D:$D,IFERROR(MATCH(A1,$B:$B,0),MATCH(A1,$C:$C,0))))

    then copy down.

    Hope this helps.

    Pete

  3. #3
    Registered User
    Join Date
    03-22-2013
    Location
    Sterling, VA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Match a value present in one of two columns and output a value in the matched row

    Pete,

    Thanks for the quick reply this did the trick.

    Alex

+ 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