+ Reply to Thread
Results 1 to 7 of 7

Comparing 2 lists for indicating where data appears on both

  1. #1
    Registered User
    Join Date
    07-27-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    41

    Comparing 2 lists for indicating where data appears on both

    I have 2 lists of Addresses (lets call them List A and List B) on 2 seperate workbooks, I need to compare the 2 lists and in a fresh column indicate whether the data from List A also appears on List B.

    For example:

    List A

    123 New Street
    124 New Street
    125 New Street
    126 New Street
    127 New Street

    List B

    123 New Street
    126 New Street
    127 New Street


    I want to return either a Y to indicate that 123/126/127 New Street appears on both or a N to indicate that 124 New Street and 125 New Street are not part of list.

    I have tried a vlookup but it does not help.

    Any suggestions please?

  2. #2
    Valued Forum Contributor Rahul Nagar's Avatar
    Join Date
    09-18-2008
    Location
    nasik
    MS-Off Ver
    Excel 2003
    Posts
    465

    Re: Comparing 2 lists for indicating where data appears on both

    Hi,

    Please check the attached file.
    you can change 123/125/126 into Y
    Attached Files Attached Files
    Last edited by Rahul Nagar; 07-27-2010 at 07:23 AM.
    __________________
    Regards
    Rahul Nagar
    Founder of www.myshortcutkeys.com.


    If you get the answer of your questions then please click EDIT in your original post then click on GO ADVANCED and set the PREFIX box to SOLVED. It helps everybody! ....
    Also
    If you are satisfied by any members response to your problem please consider using the scales icon top right of thier post to show your appreciation.

  3. #3
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Comparing 2 lists for indicating where data appears on both

    This will give you number where you data match: =MATCH(A1&B1, INDEX(Sheet1!A:A&Sheet1!B:B, 0), 0)

    Where your formula is next to data on List B.

    To make it faster limit your search list : INDEX(Sheet1!$A$1:$A$1000&Sheet1!$B$1:$B$1000

  4. #4
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Comparing 2 lists for indicating where data appears on both

    For Y you can make some if statement, for example:

    =IF(ISNUMBER(MATCH(A1&B1;INDEX(Sheet1!A:A&Sheet1!B:B;0);0));"Y";"No data")

    (replace ; with ,)
    Attached Files Attached Files
    Last edited by zbor; 07-27-2010 at 07:28 AM.

  5. #5
    Registered User
    Join Date
    07-27-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Comparing 2 lists for indicating where data appears on both

    All those solutions are close/correct in theory but in application they dont work.

    I have attached a small snippet of what I have to do as an example:

    In sheet 1 column C I want an indication that "63 Ashdown Drive" appears in sheet 2 Column B as well (in the actual exercise the 2 tables are in different spreadsheets all together) and that the other addresses are not in sheet 2


    If a formula can indicate where the data appears on both lists then I can filter column C.
    Attached Files Attached Files
    Last edited by MjRmatt; 07-27-2010 at 07:56 AM.

  6. #6
    Forum Moderator zbor's Avatar
    Join Date
    02-10-2009
    Location
    Croatia
    MS-Off Ver
    365 ProPlus
    Posts
    15,602

    Re: Comparing 2 lists for indicating where data appears on both

    Here...

    Only you need to get rid of double space between words: 63__ASHDOWN DRIVE
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    07-27-2010
    Location
    London
    MS-Off Ver
    Excel 2007
    Posts
    41

    Re: Comparing 2 lists for indicating where data appears on both

    I didnt notice the double space, no wonder nothing was working in practice. Thank you

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

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