+ Reply to Thread
Results 1 to 2 of 2

Thread: Macro for Merging and Sorting

  1. #1
    Registered User
    Join Date
    09-26-2011
    Location
    Minnesota, USA
    MS-Off Ver
    Excel 2007
    Posts
    1

    Macro for Merging and Sorting

    I have two excel worksheets that I need to merge and then would like to sort the information so that the names align.

    One sheet has columns Last Name, First Name, Age and the other sheet has columns Last Name, First Name, Address. Since some names are missing on each sheet, I'd like to sort the list and match the last names.

    Does anyone know the VBA code for this?

  2. #2
    Forum Guru davegugg's Avatar
    Join Date
    12-18-2008
    Location
    WI, US
    MS-Off Ver
    2007
    Posts
    1,879

    Re: Macro for Merging and Sorting

    It would be easiest to use two vlookups: one to bring either the age or address from one sheet onto the other, and the other to identify any names missing on the "merged" sheet. If you post a sample worksheet with a portion of the two lists I can show you how, though please scrub the sheets of any personal info.
    Is your code running too slowly?
    Does your workbook or database have a bunch of duplicate pieces of data?
    Have a look at this article to learn the best ways to set up your projects.
    It will save both time and effort in the long run!


    Dave

+ 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.2.0