+ Reply to Thread
Results 1 to 7 of 7

Macro that merges matching data from two sheets and pastes to a new sheet (in line)

  1. #1
    Registered User
    Join Date
    10-05-2012
    Location
    Longmont
    MS-Off Ver
    Excel 2010
    Posts
    30

    Macro that merges matching data from two sheets and pastes to a new sheet (in line)

    Hey All,

    I'm surprised I couldn't find this exact problem in another thread. Anyway, I have 3 sheets:
    RA1
    RA2
    Paired RA

    I'm working on a macro that matches data from the first two sheets and lines it up in the third. I need it to:
    -Compare file IDs (columns B) from RA1 and RA2 sheets.
    -Move matching (omit non-matching) file IDs and their corresponding data (columns A, C, D) to the Paired RA sheet.
    -Line-up the matching file IDs and other data on the same row.

    See attached example
    Paired Data Example.xlsx

    The code I have so far seems to match them well enough, but it doesn't line the matches up.

    Please Login or Register  to view this content.
    I'm relatively new to macros. Any idea what I'm doing wrong?

    THANKS!

  2. #2
    Registered User
    Join Date
    10-05-2012
    Location
    Longmont
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Macro that merges matching data from two sheets and pastes to a new sheet (in line)

    Oops! Pasted the wrong code. The only difference between the code I posted and the one I'm using is the name of the third sheet. It's "Paired RA" not "Combined RA."

  3. #3
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Macro that merges matching data from two sheets and pastes to a new sheet (in line)

    Try the attached
    Attached Files Attached Files

  4. #4
    Registered User
    Join Date
    10-05-2012
    Location
    Longmont
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Macro that merges matching data from two sheets and pastes to a new sheet (in line)

    That worked perfectly! Thank you so much for your help!

  5. #5
    Registered User
    Join Date
    10-05-2012
    Location
    Longmont
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Macro that merges matching data from two sheets and pastes to a new sheet (in line)

    I thought I'd come back and thank you again, Jindon. That code is flawless. It works really well. I appreciate your fast response.

  6. #6
    Forum Guru
    Join Date
    08-15-2004
    Location
    Tokyo, Japan
    MS-Off Ver
    2013 O.365
    Posts
    22,525

    Re: Macro that merges matching data from two sheets and pastes to a new sheet (in line)

    Quote Originally Posted by njmiller31 View Post
    I thought I'd come back and thank you again, Jindon. That code is flawless. It works really well. I appreciate your fast response.
    Glad that you like it and thanks for the feedback.

  7. #7
    Registered User
    Join Date
    09-17-2013
    Location
    Evansville, USA
    MS-Off Ver
    Excel 2007
    Posts
    31

    Re: Macro that merges matching data from two sheets and pastes to a new sheet (in line)

    If I wanted to do this same thing but with more than one sheet and also have the data that do not match copied over to a new line, how would I do that? Is there a way?

+ 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