+ Reply to Thread
Results 1 to 5 of 5

Match two criteria in two columns

Hybrid View

  1. #1
    Registered User
    Join Date
    05-26-2022
    Location
    USA
    MS-Off Ver
    365
    Posts
    29

    Match two criteria in two columns

    Is it possible to match a name with a job when the name is in column and the job in another table row along with the name?

    I have attached a sheet as I'm having trouble articulating what i need.

    I have a long list of People and then their associated jobs. I need to combine this into a table that has the person's name in the column and an x below their name if they can do that job.

    Thanks,
    Jason
    Attached Files Attached Files

  2. #2
    Forum Expert bebo021999's Avatar
    Join Date
    07-22-2011
    Location
    Vietnam
    MS-Off Ver
    Excel 2016
    Posts
    9,481

    Re: Match two criteria in two columns

    D3 and down: list of unique job

    =IFERROR(INDEX($B$2:$B$15,MATCH(0,INDEX(COUNTIF($D$2:D2,$B$2:$B$15),),0)),"")
    E2 and across: list of unique Person

    =IFERROR(INDEX($A$2:$A$15,MATCH(0,INDEX(COUNTIF($D$2:D2,$A$2:$A$15),),0)),"")
    E3 down and accross

    =IF($D3="","",IF(AGGREGATE(14,6,($A$2:$A$15=E$2)/($B$2:$B$15=$D3),1)>0,"x",""))
    This is for sample, with few hundred rows of data.

    If there are large number of rows, these complex formulas will slow down processing speed.
    Then VBA solution will be a good choice and I will come back to assist.
    Attached Files Attached Files
    Quang PT

  3. #3
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,028

    Re: Match two criteria in two columns

    Another way,

    =LET(
      a,FILTER(A2:B100,A2:A100<>""),
      b,SORT(UNIQUE(INDEX(a,,2))),
      c,TRANSPOSE(SORT(UNIQUE(INDEX(a,,1)))),
      d,MAKEARRAY(ROWS(b),COLUMNS(c),LAMBDA(x,y,IFERROR(IF(ROWS(FILTER(a,(INDEX(a,,2)=INDEX(b,x,1))*(INDEX(a,,1)=INDEX(c,1,y))))>0,"x",""),""))),
      VSTACK(HSTACK("",c),HSTACK(b,d))
    )
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    05-26-2022
    Location
    USA
    MS-Off Ver
    365
    Posts
    29

    Re: Match two criteria in two columns

    Thank you all for the help

  5. #5
    Forum Expert
    Join Date
    04-14-2009
    Location
    Taiwan
    MS-Off Ver
    Excel 2016,2019,O365
    Posts
    2,028

    Re: Match two criteria in two columns

    You are welcome.
    -----------------------------------
    If that takes care of your original question, please click on "Thread Tools" from the menu link above and mark this thread as SOLVED.

+ 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. [SOLVED] Index/Match with 2-criteria match across columns
    By Dajmcnn in forum Excel Formulas & Functions
    Replies: 10
    Last Post: 03-04-2022, 03:18 PM
  2. [SOLVED] Macro to Match Criteria in Columns and Output to New Columns
    By technik in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 10-08-2018, 08:07 AM
  3. [SOLVED] Macro to Match Criteria in Columns and Output in New Columns
    By technik in forum Excel Programming / VBA / Macros
    Replies: 15
    Last Post: 10-06-2018, 10:56 AM
  4. Using index match based on two match criteria in different columns
    By LearningByError in forum Excel General
    Replies: 2
    Last Post: 08-02-2018, 01:57 PM
  5. Index/Match but the second match criteria >0 regarding 3 columns
    By Ben2487 in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 09-29-2014, 12:08 PM
  6. Help!! Match Two Columns with different criteria
    By trent172 in forum Excel General
    Replies: 1
    Last Post: 06-09-2012, 01:58 AM
  7. Sum of all columns that match criteria of another column along the same row
    By OMGTHISGUY in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 11-08-2011, 01:27 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