+ Reply to Thread
Results 1 to 6 of 6

Comparing Mutliple-Row Cells Against Master List

  1. #1
    Registered User
    Join Date
    02-29-2012
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Comparing Mutliple-Row Cells Against Master List

    Column A contains cells with unique rows, each separated by a soft return / CHAR(10):

    A1:
    stringa
    stringb
    stringc
    A2:
    stringd
    stringe
    A3:
    stringf

    Column B is a list of strings to check against:

    B1:
    stringb
    B2:
    stringd

    How can I check if each cell in Column A contains any string/row from Column B? My desired output is:

    C1:
    Match
    C2:
    Match
    C3:
    No Match

    From my non-Excel-expert perspective, the desired algorithm is something like:

    FOR each row in Column A
    IF any string in Cell A_ = any row in Column B
    THEN C1 = "Match"
    ELSE C1 = "No Match"

    The number of strings in Column B is subject to change, so the solution needs to be able to handle a large Column B reference list (potentially 1000 rows). The number of rows in Column A is also potentially very large (2000+ rows).

    Thanks for any help!

  2. #2
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Comparing Mutliple-Row Cells Against Master List

    Hi dsizzle,

    See the attached file and let me know if this solves your purpose. Thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files
    DILIPandey, Excel rMVP
    +919810929744 (India), +971528225509 (Dubai), [email protected]

  3. #3
    Registered User
    Join Date
    02-29-2012
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Comparing Mutliple-Row Cells Against Master List

    Hi DILIPandey,

    Thanks for the response--unfortunately, I am unable to find the attached file. Could you please post it again? I believe it should appear in the body of the post--is this incorrect?

    Thanks,
    dsizzle

  4. #4
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Comparing Mutliple-Row Cells Against Master List

    Ooppss...
    You are correct dsizzel, it should appear in the body of the post but somehow it got missed, attached again. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files

  5. #5
    Forum Expert dilipandey's Avatar
    Join Date
    12-05-2011
    Location
    Dubai, UAE
    MS-Off Ver
    1997 - 2016
    Posts
    8,191

    Re: Comparing Mutliple-Row Cells Against Master List

    Ooppss...
    You are correct dsizzel, it should appear in the body of the post but somehow it got missed, attached again. Thanks.

    Regards,
    DILIPandey

    <click on below 'star' if this helps>
    Attached Files Attached Files
    Last edited by dilipandey; 03-01-2012 at 01:15 AM.

  6. #6
    Registered User
    Join Date
    02-29-2012
    Location
    Boston, MA
    MS-Off Ver
    Excel 2010
    Posts
    8

    Re: Comparing Mutliple-Row Cells Against Master List

    DILIPandey,

    Thanks so much for the help; I really appreciate it. Unfortunately, though, this is not yet the full solution I was looking for. As far as I understand, you have written Column C such that for each row, if Column A contains a string that matches the same row in Column B, then Column C displays "Match". This is a great start. What I need next is to compare each row in Column A against all rows in Column B. So in the example you sent, if B3 contains "stringa", then I want C1 to display "Match" because A1 contains "stringa". Does this make sense? I apologize if I was not clear in my first post.

    Regards,
    dsizzle

+ 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