+ Reply to Thread
Results 1 to 2 of 2

Merge/Consolidate Worksheets Based Upon Column Name

  1. #1
    Registered User
    Join Date
    09-03-2014
    Location
    Houston, Texas
    MS-Off Ver
    2010
    Posts
    1

    Merge/Consolidate Worksheets Based Upon Column Name

    I've been searching all over the place and haven't found an example quite like I want to do.

    I've got about 4 dozen name and address files. One is the master name and address file with the following fields in the following order:

    Last Name
    First Name
    Email
    Address
    City State
    Zip
    Phone
    Etc

    It has 50 records in it presently.

    Unfortunately, the other 4 dozen excel files don't follow this format or column order. For example, the format in one file is:

    First Name
    Last Name
    Phone
    Address
    City
    State
    Zip
    Email

    Other excel files have other formats as well and varying numbers of columns, some of which I don't need for this exercise. So, I can't just do a copy/paste of the entire spreadsheet and copying/pasting column by column is very tedious considering the number of worksheets involved.

    What I want to do is append the contents of the second worksheet into the first, based upon column name. In other words, this second worksheet, containing 25 records would be appended to the first worksheet beginning at column 51 with the columns moved/copied to the correct order in the first spreadsheet. Am I making sense?

    I think I could do this with a VBA macro... want to see if something already exists or if others have better ideas.

    Thank you.

  2. #2
    Forum Guru xladept's Avatar
    Join Date
    04-14-2012
    Location
    Pasadena, California
    MS-Off Ver
    Excel 2003,2010
    Posts
    12,378

    Re: Merge/Consolidate Worksheets Based Upon Column Name

    You can nail the columns with code like this

    Please Login or Register  to view this content.
    Where ws is the worksheet.
    If I've helped you, please consider adding to my reputation - just click on the liitle star at the left.

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~(Pride has no aftertaste.)

    You can't do one thing. XLAdept

    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~aka Orrin

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] macro to consolidate data from worksheets within workbook based on criteria
    By jw01 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-08-2013, 05:58 PM
  2. [SOLVED] Find duplicates in multiple worksheets and consolidate based on unique id
    By desibabuji in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 06-14-2013, 04:09 PM
  3. Consolidate/Merge Worksheets
    By karlr9 in forum Excel General
    Replies: 0
    Last Post: 07-22-2009, 01:29 PM
  4. Merge / Consolidate Worksheets
    By Hoopsah in forum Excel General
    Replies: 4
    Last Post: 08-02-2007, 07:47 AM
  5. combine, merge, consolidate worksheets
    By biglu in forum Excel General
    Replies: 6
    Last Post: 12-05-2006, 05:40 PM

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