+ Reply to Thread
Results 1 to 15 of 15

Matching of Lists

  1. #1
    Registered User
    Join Date
    01-03-2015
    Location
    Zurich, Switzerland
    MS-Off Ver
    2011
    Posts
    5

    Matching of Lists

    Dear All,

    Does anyone know how to do the following in Excel?

    1. I have two lists: List 1 contains unique (Elephant) and repetitive (Bird, Cat, Dog) items. List 2 contains only unique items and it is a subset of List 1.

    2. I wish to match List 2 to List 1, so that in the output I would have to two lists side by side, with the items in List 2 repeated the same number of times as the corresponding items in List 1. As for the items in List 1 but not in List 2, the corresponding cells in List 2 can be empty or filled with any identifier.

    Please refer to the attached image.

    The format in the output may vary according to the functionality of Excel. In the end, I am only interested to know that Bird in List 2 is found in Rows 2 and 3 in List 1, and Dog in rows 7, 8, and 9.

    Matching.jpg

    Thanks in advance!

  2. #2
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Matching of Lists

    Cell B2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy down.

    Regards, TMS
    Trevor Shuttleworth - Retired Excel/VBA Consultant

    I dream of a better world where chickens can cross the road without having their motives questioned

    'Being unapologetic means never having to say you're sorry' John Cooper Clarke


  3. #3
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Matching of Lists

    You can try following formula in F2 assuming you wanted to have result in column F
    HTML Code: 
    Thanks,
    Anil Dhawan


    Click *Add Reputation to say "Thanks" and don't forget to mark threads as "Solved" (Thread Tools->Mark thread as Solved) if you are satisfied.

    Don't stop when you are tired. STOP when you are done!

  4. #4
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Matching of Lists

    Or B2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy down.

  5. #5
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Matching of Lists

    @Yoshi - Now you have 3 ways to get the same thing. This is what special here.

  6. #6
    Registered User
    Join Date
    01-03-2015
    Location
    Zurich, Switzerland
    MS-Off Ver
    2011
    Posts
    5

    Re: Matching of Lists

    Hi All,

    Thanks for the prompt reply and suggestions! But I still can't get it to work. I tried all formulae suggested and got a message saying there's an error in my formula. Do you guys know what's wrong? Sorry, I am not good in Excel. Simple things may not be that obvious to me.

    error.jpg

  7. #7
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Matching of Lists

    Hi Y0shi,

    The formula is seems to be fine and should work don't know whats the problem. Till the time, you can try below one.

    Quote Originally Posted by TMS View Post
    Or B2:
    Formula: copy to clipboard
    Please Login or Register  to view this content.
    and copy down.
    Or

    Quote Originally Posted by adhawan06 View Post
    You can try following formula in F2 assuming you wanted to have result in column F
    HTML Code: 

  8. #8
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Matching of Lists

    Try changing the commas (,) to semi-colons ( ; ).

    Probably Regional Settings issue.


    Regards, TMS

  9. #9
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Matching of Lists

    Btw Y0shi which version of excel you are using currently. Are you on Mac? or window? If you are on Mac try replacing (,) with ( ; ).

  10. #10
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Matching of Lists

    @Any: I don't think it's because he's on a Mac, I think it's because he's in Switzerland.
    Last edited by TMS; 04-16-2015 at 06:20 AM.

  11. #11
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Matching of Lists

    Quote Originally Posted by TMS View Post
    @Any: I don't think it's because he' son a Mac, I think it's because he's in Switzerland.
    @TMC but if he's in Switzerland then how it matter not getting the result

  12. #12
    Registered User
    Join Date
    01-03-2015
    Location
    Zurich, Switzerland
    MS-Off Ver
    2011
    Posts
    5

    Re: Matching of Lists

    You guys are awesome!

    Semicolon worked beautifully!! So it's really a regional setting issue. Thanks peeps!!

  13. #13
    Valued Forum Contributor
    Join Date
    04-12-2012
    Location
    India
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016, 2019, Office 365, Google Spreadhsheet
    Posts
    640

    Re: Matching of Lists

    y0shi,

    Glad it worked.



    Please take few seconds to mark this thread as SOLVED and say thanks to the person who helped you by adding *Add Reputation.


    Cheers!!!


    Anil

  14. #14
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Matching of Lists

    You're welcome.

    Some countries use a comma as a separator, others use a semi-colon. This is usually set up when you install Windows and tell it where you are (if it hasn't worked it out for itself). I guessed from the location in your profile that this might be the case.


    If you are satisfied with the solution(s) provided, please mark your thread as Solved.


    New quick method:
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

    Or you can use this way:

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save


    You may also want to consider thanking those people who helped you by clicking on the little star at the bottom left of their reply to your question.

  15. #15
    Forum Guru TMS's Avatar
    Join Date
    07-15-2010
    Location
    The Great City of Manchester, NW England ;-)
    MS-Off Ver
    MSO 2007,2010,365
    Posts
    44,425

    Re: Matching of Lists

    @Anil:
    then how it matter not getting the result
    I don't understand your question. Maybe I've answered it in my last post?

+ 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 lists
    By louhou in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 04-22-2009, 03:41 PM
  2. Matching 2 lists
    By 00skins in forum Excel General
    Replies: 1
    Last Post: 04-14-2008, 10:58 AM
  3. Matching two lists?
    By NPgs1uk in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-02-2007, 06:54 AM
  4. [SOLVED] Matching two lists.
    By Jwhite in forum Excel General
    Replies: 1
    Last Post: 03-16-2006, 07:20 PM
  5. matching lists
    By dakotasteve in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 01-04-2005, 04:56 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