+ Reply to Thread
Results 1 to 12 of 12

Matching 2 columns and calling another if matched

Hybrid View

  1. #1
    Registered User
    Join Date
    05-19-2014
    Posts
    7

    Matching 2 columns and calling another if matched

    I have 2 columns worth of data (ie: B and C). I want to see if there are matches AND if there are matches, I want another column's data to be shown (ie: A).

    Columns B and C are peoples names and column A are employee numbers. Sat around bouncing ideas off coworkers and we could not figure anything out.

  2. #2
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Matching 2 columns and calling another if matched

    Not real clear.

    Post a few rows worth of data and tell us what result you expect.

    Also, tell us what version of Excel you're using.
    Biff
    Microsoft MVP Excel
    Keep It Simple Stupid

    Let's Go Pens. We Want The Cup.

  3. #3
    Registered User
    Join Date
    05-19-2014
    Posts
    7

    Re: Matching 2 columns and calling another if matched

    A | B C D
    NAME | NAME Employee ID
    John Smith | John Doe 3445
    Jessica Lane | Mike Hill 9920
    John Doe | Jane Doe 9803


    I am attempting to find matches between "A" and "B", and if there is a match, I want the Employee ID to be shown in "D". Also, I am running Office 2010.

  4. #4
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Matching 2 columns and calling another if matched

    It might be better if you post a sample file that includes the results you expect.

    ~20 rows worth of data will be plenty.

  5. #5
    Registered User
    Join Date
    05-19-2014
    Posts
    7

    Re: Matching 2 columns and calling another if matched

    HELP.png

    Hope this makes its a little more clear- After looking at it for so long, I have begun to confuse myself

  6. #6
    Forum Expert
    Join Date
    12-03-2009
    Location
    Florence, Italy
    MS-Off Ver
    Excel 2019
    Posts
    1,796

    Re: Matching 2 columns and calling another if matched

    Hi,

    a small attempt

    =INDEX(D2:D100,MATCH(1,INDEX((A2:A100="Pam")*(C2:C100="Jerry"),),0))
    Hope it helps
    -----------------------------------------------------

    At Excelforum, you can say "Thank you!" by clicking the star icon ("Add Reputation") below the post.

    Please, mark your thread [SOLVED] if you received your answer.

  7. #7
    Registered User
    Join Date
    05-19-2014
    Posts
    7

    Re: Matching 2 columns and calling another if matched

    TPDave: Yes, that would be the ultimate goal

  8. #8
    Forum Contributor
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Matching 2 columns and calling another if matched

    So in column F you want every entry in column D that appears alongside a match in names from columns A and C?

  9. #9
    Registered User
    Join Date
    05-19-2014
    Posts
    7

    Re: Matching 2 columns and calling another if matched

    That is along the line of what I need, but "Pam" and "Jerry" are not matches [the blue column is trying to represent the two being seperate columns]. I would like to see the name "Seth" match and produce his ID "2567" in Column F

  10. #10
    Forum Contributor
    Join Date
    12-19-2013
    Location
    London
    MS-Off Ver
    Excel 2010
    Posts
    191

    Re: Matching 2 columns and calling another if matched

    ^But in your example "Seth" isn't a matching line? As Tony Valko said it would be very helpful if you could upload a file that contains a few rows of data with your expected results for us to work with.

    Thanks

  11. #11
    Registered User
    Join Date
    05-19-2014
    Posts
    7

    Re: Matching 2 columns and calling another if matched

    test.xlsx

    Is this good enough?

  12. #12
    Forum Expert Tony Valko's Avatar
    Join Date
    12-31-2011
    Location
    Pittsburgh
    MS-Off Ver
    2002, 2007:2013
    Posts
    18,890

    Re: Matching 2 columns and calling another if matched

    Try this...

    Data Range
    A
    B
    C
    D
    E
    F
    1
    Name
    Name
    Employee ID
    Employee ID of Matches
    2
    Rick
    Jessica
    1453
    2567
    3
    Mike
    Logan
    6257
    7844
    4
    Chris
    Seth
    2567
    3478
    5
    Seth
    Glenn
    2256
    2547
    6
    Tyler
    Taylor
    9584
    7
    Pam
    Jerry
    3492
    8
    Terry
    Paul
    7844
    9
    Paul
    Chris
    3478
    10
    Mary
    Wayne
    6596
    11
    Lane
    Terry
    2547
    12
    ------
    ------
    ------
    ------
    ------
    ------


    This array formula** entered in F2:

    =IFERROR(INDEX(D:D,SMALL(IF(ISNUMBER(MATCH(C$2:C$11,A$2:A$11,0)),ROW(D$2:D$11)),ROWS(F$2:F2))),"")

    ** array formulas need to be entered using the key
    combination of CTRL,SHIFT,ENTER (not just ENTER).
    Hold down both the CTRL key and the SHIFT key
    then hit ENTER.

    Copy down until you get blanks.

+ 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: 4
    Last Post: 12-27-2013, 07:53 AM
  2. [SOLVED] Matching a value in a column & then summing a respective cell from a the matched value..
    By Scottie in BKK in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 10-07-2012, 12:40 PM
  3. Match columns and calculate if not matched
    By magman1984 in forum Excel - New Users/Basics
    Replies: 3
    Last Post: 03-28-2012, 05:15 PM
  4. Calling Data From Matching Workbook Titles.
    By sleazyfish in forum Excel General
    Replies: 2
    Last Post: 11-09-2009, 05:02 AM
  5. Matching Two Conditions and Copying a cell from a Matched condition Formula
    By falcons7 in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 04-15-2009, 07:38 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