+ Reply to Thread
Results 1 to 10 of 10

Return List based on Multiple Column Matching

  1. #1
    Registered User
    Join Date
    08-24-2019
    Location
    Arizona
    MS-Off Ver
    365
    Posts
    6

    Return List based on Multiple Column Matching

    I am needing some formula help to return a list based on multiple column matching.

    For example,

    First Name, Last Name, Skill, Selected First, Selected Last, Skill
    John, Doe, A, John, Doe, ???
    John, Doe, B
    Jane, Doe, C
    John, Johnson, A

    My data validation only returns the first match for John Doe "A". I am needing A, B and C to be place in the list when selecting John Doe.

    Data Validation Forumula:

    =INDEX(C2:C7,MATCH(1, (D2=A:A)*(E2=B:B),0))

    Any help would be greatly appreciated!
    Attached Files Attached Files

  2. #2
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Return List based on Multiple Column Matching

    Create a Named Range (CTRL-F3) called skill. Use this as the NR formula:

    Formula: copy to clipboard
    Please Login or Register  to view this content.


    In data validation, select = Skill.

    see sheet
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  3. #3
    Registered User
    Join Date
    08-24-2019
    Location
    Arizona
    MS-Off Ver
    365
    Posts
    6

    Re: Return List based on Multiple Column Matching

    Unfortunately a named range will not work, as the skills will have spaces and special characters.

  4. #4
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Return List based on Multiple Column Matching

    You might at least have tried it out. See sheet (nothing, except the skills, has been changed). If that doesn't work, reload a REALISTIC sheet, not a pale imitation of the real thing.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-24-2019
    Location
    Arizona
    MS-Off Ver
    365
    Posts
    6

    Re: Return List based on Multiple Column Matching

    You are right, should have posted the real one

    Having trouble translating it over, here it is.

    On Worksheet column C - select Baseball. On Worksheet column D select 6th/7th/8th. The Home Team and Away Team should only load the teams from the Teams worksheet Where Teams A matches Worksheet C, and Teams B matches Worksheet D.
    Attached Files Attached Files

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Return List based on Multiple Column Matching

    OK. I'm away now. Back in 12 hr

  7. #7
    Registered User
    Join Date
    08-24-2019
    Location
    Arizona
    MS-Off Ver
    365
    Posts
    6

    Re: Return List based on Multiple Column Matching

    Thanks man - really appreciate the help!

  8. #8
    Registered User
    Join Date
    08-24-2019
    Location
    Arizona
    MS-Off Ver
    365
    Posts
    6

    Re: Return List based on Multiple Column Matching

    I was able to get it working mostly right with the following formula (and adding a column where the data was concatenated - column F):

    =OFFSET(Teams!$C$1,MATCH(C$2&D$2,Teams!F$1:F$94,0),0,COUNTIF(Teams!$F$1:$F$94,$C$2&$D$2),1)

    Now the only issue I am seeing is the values lose their sorting, which would make data entry difficult on a large list.

  9. #9
    Registered User
    Join Date
    08-24-2019
    Location
    Arizona
    MS-Off Ver
    365
    Posts
    6

    Re: Return List based on Multiple Column Matching

    Attached demos the sort issue.
    Attached Files Attached Files

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,036

    Re: Return List based on Multiple Column Matching

    Your attachment at Post 11 was completely blank. So I used the one from Post 5.

    I added a header column and sorted first by column A and then by column B. Now all the relevant values are beside each other. I prefer not to use OFFSET, as it recalculates EVERY time ANYTHING is changed. Like dynamite, OFFSET needs to be handled carefully!!

    What is the point of column D? It contains the SAME values as column C. So I based Home & Away on column C. You can delete column D... and column E?? There is, of course, the possibility of selecting the same team in both columns... or the same team twice, further down the page. That can be controlled, too, if you need. However, I have not done so... yet. The DV is applied only on the shaded cells. Try it out. Don't extend it all the way down the sheet, unless you have 1,000,000 lines of data. use a reasonable, future-proof range.

    I changed your named range for Level, too, as it didn't seem to be working.

    Another useful feature might be to replace the fixed ranges in the DV with dynamic ranges, which will adjust automatically if/when teams and/or levels are added. Can that happen often?
    Attached Files Attached Files

+ 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. Matching 2 tabs and return Yes/No based on info in a horizontal list
    By exced in forum Excel Formulas & Functions
    Replies: 22
    Last Post: 04-26-2019, 05:31 PM
  2. [SOLVED] Formula to return the highest number in a column based on a matching second column
    By kersplash in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-29-2019, 02:41 AM
  3. [SOLVED] Compare item in one column to a list in another, then return corresponding matching data
    By randomkiwi in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 06-21-2016, 07:51 PM
  4. Return multiple values based on one matching field
    By pmerchant73 in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 06-21-2016, 10:02 AM
  5. [SOLVED] Return value based on matching across multiple columns
    By cde1983 in forum Excel General
    Replies: 3
    Last Post: 12-20-2011, 09:34 PM
  6. Replies: 3
    Last Post: 11-24-2011, 09:55 AM
  7. Return value in a column based on conditions matching with different column
    By sanits591 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 12-15-2009, 01:28 AM

Tags for this Thread

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