+ Reply to Thread
Results 1 to 6 of 6

Combine two sheets (or workbooks) by matching / replacing values

  1. #1
    Registered User
    Join Date
    04-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Combine two sheets (or workbooks) by matching / replacing values

    Hello all,

    I have a hard time figuring out the following, and I was hoping that one of you might be able to help me out.

    I have two workbooks (but I could place them in a sheet if that will be easier), they both contain a lot of data (about 21500 rows).
    I am trying to combine both of these workbooks (/sheets) into one.

    They are set up like this.
    Workbook 1:
    Film_______ Starring_______
    Book of Eli__ mabcd, mdefg, mhijklm
    Avatar_____ ertg, ujnkl, mabdd
    Friends_____ qwer, uiopp

    Workbook 2:
    Actor_____ FilmsID_____
    Johnny____ mabcd, ertg
    Madonna__ qwer, mdefg, ujnkl
    Bella______ uiopp, mhijklm

    I hope your seeing the logic here. Workbook one contains all films with and ID of actors that are starring in that movie. Workbook two contains all the actors, with an ID that matches up with the movie they play in.
    Thus in the above example:
    Johnny would be in the Book of Eli, and Avatar.
    Madonna would be in Friends, the Book of Eli, and Avatar.
    Bella would be in Friends, and the Book of Eli.

    This is thus how it should look like:
    Film_______ Starring_______
    Book of Eli__ Johnny, Madonna, Bella
    Avatar_____ Johnny, Madonna, mabdd
    Friends_____ Madonna, Bella

    I hope this makes sense.
    There are thus multiple actors/ID's in one column, but I could split these with "Text to Columns" if this will make it easier to solve.
    I am not really sure where to start, I been playing around with INDEX, MATCH, and LOOKUP, but I can't seem to figure it out.
    Also, maybe acces (with SQL statements) might be a better solution here? Any thoughts on that?

    Thanks in advanced, I appreciated all the 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: Combine two sheets (or workbooks) by matching / replacing values

    Hi,

    Welcome to the forum.

    Yes... post the file after doing "Text to Columns" . thanks.

    Regards,
    DILIPandey


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

  3. #3
    Registered User
    Join Date
    04-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Re: Combine two sheets (or workbooks) by matching / replacing values

    Thanks for your quick reply, and welcoming message!

    Here is the file, I removed a few columns/rows to make it a lot smaller.. It still has a lot of rows though (I was afraid the ID might not match up anymore)
    Its a database from an online movie forum, thus it might contain inappropriate words / terms / titles (even though it shouldn't).

    Thanks,

    EDIT01:
    Thus, just to clarify a bit, what I am trying to achieve is a single sheet mentioned the movie title, followed by all the actors starring in it.
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    04-03-2012
    Location
    USA
    MS-Off Ver
    Excel 2007
    Posts
    3

    Arrow Re: Combine two sheets (or workbooks) by matching / replacing values

    Anyone (A) ?

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

    Re: Combine two sheets (or workbooks) by matching / replacing values

    Hi,

    Please find the attached solution. thanks.

    Regards,
    DILIPandey

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

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

    Re: Combine two sheets (or workbooks) by matching / replacing values

    Hi YoMommasBoy,

    Out of interest, just wanted to know if above solution helped you. Thanks.


    Regards,
    DILIPandey

    <click on below 'star' if this helps>

+ 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