+ Reply to Thread
Results 1 to 7 of 7

Macro to Compare/Merge 2 Excel Sheets

  1. #1
    Registered User
    Join Date
    01-15-2013
    Location
    DC
    MS-Off Ver
    Excel 2007
    Posts
    7

    Exclamation Macro to Compare/Merge 2 Excel Sheets

    Hello All,

    First, please know that i have experience with code HOWEVER, i am still a beginner and in need of help. Looking at other threads helps a little but i need code with comments so i can understand whats being done because as i said, i am a beginner. I will try to give a detailed description of what i need. I had trouble formatting the tables below so please see attached document for full description of the problem.

    Summary of problem: I have two excel sheets. One Sheet has Department and the other does not, the only comparison is the columns 'First Name' and 'Last Name' . I need to merge so that the 'Department' is also in the sheet.


    Is this possible? I really need help, i have been pondering over this for weeks now. I GREATLY APPRECIATE any help!!
    Attached Files Attached Files

  2. #2
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Macro to Compare/Merge 2 Excel Sheets

    Give this a try

    Please Login or Register  to view this content.
    Thanks,
    Mike

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.
    Select Thread Tools-> Mark thread as Solved.

  3. #3
    Registered User
    Join Date
    01-15-2013
    Location
    DC
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Macro to Compare/Merge 2 Excel Sheets

    Thanks so much for the help!! I have 1 question, in Sheet 2, i have some rows with information other than names, i noticed that when it produces sheet 3, the rows disappear. Is there a way to keep those rows in sheet 3?

  4. #4
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Macro to Compare/Merge 2 Excel Sheets

    Can you upload a workbook instead of an word doc showing what your wanting to happen?

  5. #5
    Registered User
    Join Date
    01-15-2013
    Location
    DC
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Macro to Compare/Merge 2 Excel Sheets

    Mike,

    Attached is an Excel workbook Excel_Merge.xlsxdisplaying what i would like to happen. "Sheet 3" shows what i woiuld like the macro to create. The code above works great except that when creating sheet 3, it eliminates the rows from sheet 2 that do not contain a name. I still need those rows in sheet 3. Thanks so much for your help!
    Last edited by Anthony123; 01-28-2013 at 10:39 PM.

  6. #6
    Forum Expert mike7952's Avatar
    Join Date
    12-17-2011
    Location
    Florida
    MS-Off Ver
    Excel 2007, Excel 2016
    Posts
    3,520

    Re: Macro to Compare/Merge 2 Excel Sheets

    Looks like you changed sheet2 around some. Try this

    Please Login or Register  to view this content.

  7. #7
    Registered User
    Join Date
    01-15-2013
    Location
    DC
    MS-Off Ver
    Excel 2007
    Posts
    7

    Re: Macro to Compare/Merge 2 Excel Sheets

    Mike,

    Works great! You have been a MAJOR help! Thanks so much for you help and getting me what i need.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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