+ Reply to Thread
Results 1 to 11 of 11

Finding Matching Values from Multiple Columns Based on Criteria

  1. #1
    Registered User
    Join Date
    06-06-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    38

    Finding Matching Values from Multiple Columns Based on Criteria

    I have three lists of data. There is a column of criteria and a column of values. I need to find if a matching value exists in all three columns that has the same criteria.

    I have attached a sample spreadsheet. The three lists of data are each in a separate tab. The "compiled" tab is where I want the matching value outputted if it exists. There may not be a value that exists in all three lists.

    I really appreciate the help!!
    Attached Files Attached Files

  2. #2
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,957

    Re: Finding Matching Values from Multiple Columns Based on Criteria

    What output would you want for your compiled list?

    You could just use three columns of formulas:

    In B2: =VLOOKUP(A2,Sheet1!A:B,2,FALSE)
    In C2: =VLOOKUP(A2,Sheet2!A:B,2,FALSE)
    In D2: =VLOOKUP(A2,Sheet3!A:B,2,FALSE)

    Then copy those down to match your list. Then in E2, array-enter (enter using Ctrl-Shift-Enter) the formula

    =LEFT(B2,MAX(IF(LEFT(B2,COLUMN(A1:J1))=LEFT(C2,COLUMN(A1:J1)),IF(LEFT(C2,COLUMN(A1:J1))=LEFT(D2,COLUMN(A1:J1)),COLUMN(A1:J1),0),0)))

    and copy that down. That will extract the common strings from the values returned by the first formulas.
    Last edited by Bernie Deitrick; 08-29-2017 at 12:52 PM.
    Bernie Deitrick
    Excel MVP 2000-2010

  3. #3
    Registered User
    Join Date
    06-06-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Finding Matching Values from Multiple Columns Based on Criteria

    Thank you for responding!

    The issue with the Vlookup is that the first value that matches the criteria may not be a value that is found in the other two lists.

    I need a formula that will only pull a value that is found in all three lists, if it exists. I know some of the criteria will only have unique values.

    For example, I did a manual search and for the criteria Z100C, the value PN-73631 is found in all three lists. So I would like the output to be the value PN-73631.

  4. #4
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,957

    Re: Finding Matching Values from Multiple Columns Based on Criteria

    For Z100C, all these values occur on all three sheets - so which would you want?

    100-C09SKF01 A
    100-C09SKJ10 A
    100-C09UKF400 A
    100-C09V01 A
    100-C09Y200 A
    100-C12D300 A
    100-C12K300 A
    100-C12KA200 A
    100-C12KF11
    100-C23KN10M C
    100-C23SJ10 C
    100-C23SKF01 C
    100-C23SKF200 C
    100-C23SKJ10 C
    100-C23UK01 C
    100-C23UKF400 C
    100-C23UT01 C
    100-C23UT10 C
    100-C23UV01 C
    100-C23UX200 C
    100-C30UT00 C
    100-C30V00 C
    100-C37KA01 C
    100-C37T01 C
    100-C37UF00 C
    100-C37UT10 C
    100-C37UV00 C
    100-C37V10 C
    100-C37W01 C
    100-C40K400 A
    100-C40KY400 A
    100-C43KN10 A
    100-C43UKF10 A
    100-C43V01 A
    100-C60DT01 B
    100-C60UF00 B
    100-C60UKF10 B
    100-C60UT00 B
    100-C60W00 B
    100-C72DF00 B
    100-C72KP00 B
    100-C72V00 B
    100-C72Y00 B
    100-C85DG00 A
    100-C85KY01 A
    100-C85UDD00 A
    100-C85UV00 A
    100-C90DA200 A
    100-C90KJ200 A
    100-C90UD400 A
    100-C90VA200 A
    100-CR09D01 A
    100-CR09KD01 A
    100-CR09ZJ01 A
    100-CR09ZJ10 A
    100-CR12KD01 A
    100-CR12KF01 A
    100-CR12ZJ01 A
    100-CR12ZJ10 A
    100-CR16D10 A
    100-CR16ZJ10 A
    22-302-325-95
    22-302-331-95
    22-302-331-98
    22-302-619-95
    22-302-631-95
    22-302-631-97
    22-302-631-98
    22-322-331-98
    22-322-631-95
    22-362-707-95
    22-362-801-95
    22-362-807-98
    22-362-813-98
    PN-183029
    PN-212854
    PN-214788
    PN-267751
    PN-277861
    PN-304295
    PN-310680
    PN-310681
    PN-310687
    PN-310690
    PN-332406
    PN-33285
    PN-56422
    PN-65192
    PN-73631

  5. #5
    Registered User
    Join Date
    06-06-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Finding Matching Values from Multiple Columns Based on Criteria

    Great question! Sorry for not clarifying. ANY matching value will work.

  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,099

    Re: Finding Matching Values from Multiple Columns Based on Criteria

    I amade it 89 matching values for that code. You need a rethink, I think!!!
    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

  7. #7
    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,099

    Re: Finding Matching Values from Multiple Columns Based on Criteria

    With a helper column in Sheet1, C2, copied down:
    =COUNTIFS($A$2:$A$40000,A2,$B$2:$B$40000,B2)+COUNTIFS(Sheet2!$A$2:$A$40000,A2,Sheet2!$B$2:$B$40000,B2)+COUNTIFS(Sheet3!$A$2:$A$40000,A2,Sheet3!$B$2:$B$40000,B2)

    This formula in Compiled, B2, copied down:

    =IFERROR(INDEX(Sheet1!$B$2:$B$8911,MATCH(1,INDEX((Sheet1!$A$2:$A$8911=A2)*(Sheet1!C$2:C$8911=3),0),0)),"")
    Attached Files Attached Files
    Last edited by Glenn Kennedy; 08-29-2017 at 02:12 PM.

  8. #8
    Forum Expert
    Join Date
    02-11-2014
    Location
    New York
    MS-Off Ver
    Excel 365 (Windows)
    Posts
    5,957

    Re: Finding Matching Values from Multiple Columns Based on Criteria

    Here is your file, with an extra column of formulas on Sheet1. I had to delete a few thousand rows of Sheet3 to get the file small enough to upload as an attachement.
    Attached Files Attached Files

  9. #9
    Forum Expert tim201110's Avatar
    Join Date
    10-23-2011
    Location
    Russia
    MS-Off Ver
    2016, 2019
    Posts
    2,357

    Re: Finding Matching Values from Multiple Columns Based on Criteria

    all 3 sheets in sheet3, =COUNTIFS(B:B,B2,C:C,C2) and autofilter
    Attached Files Attached Files
    Last edited by tim201110; 08-29-2017 at 03:00 PM.

  10. #10
    Registered User
    Join Date
    06-06-2013
    Location
    Wisconsin
    MS-Off Ver
    Excel 2010
    Posts
    38

    Re: Finding Matching Values from Multiple Columns Based on Criteria

    Thank you so much Bernie & Glenn!!!

  11. #11
    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,099

    Re: Finding Matching Values from Multiple Columns Based on Criteria

    You're welcome and thanks for the rep.

+ 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: 3
    Last Post: 08-24-2017, 05:59 AM
  2. Replies: 8
    Last Post: 05-08-2017, 09:17 PM
  3. [SOLVED] Finding minimum and maximum values based on multiple criteria and filtered data
    By jndreece in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 05-13-2014, 10:42 AM
  4. Finding duplicate rows based on values in multiple columns
    By jamie1985 in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 04-03-2014, 08:21 AM
  5. Replies: 11
    Last Post: 01-02-2013, 10:14 AM
  6. matching values based on criteria and return values from another columns
    By lizard54 in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-06-2012, 11:29 AM
  7. Finding top 2 values per group based on multiple criteria
    By schuc in forum Excel Formulas & Functions
    Replies: 9
    Last Post: 05-22-2007, 10:51 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