+ Reply to Thread
Results 1 to 5 of 5

Combine rows with common id in column A into one row in excel 2010

  1. #1
    Registered User
    Join Date
    07-22-2013
    Location
    MN
    MS-Off Ver
    excel 2010
    Posts
    2

    Combine rows with common id in column A into one row in excel 2010

    I have 3000 rows of data. Many rows are for the same id in column a. I need to take the title, name, address, email and phone columns and move them to the end of the row so I have one row per customer id. I also need to maintain several other columns of info that are duplicated for each person.
    id, title, first, last, phone, email
    1 a b c d e
    1 a1 b1 c1 d1 e1
    would become one row:
    id, title, first, last, phone, email, title1, first1, last1, phone1, email1
    1 a b c d e a1 b1 c1 d1 e1

    Some ids have many rows that need to be combined.

  2. #2
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Combine rows with common id in column A into one row in excel 2010

    sherry64,

    Welcome to the forum!
    Generally speaking, you should leave it in its current format, which is standard for a flat file (the format that works best with Excel). It makes the data easier to work with and you can run queries (filter) on it if you need to pull specific information.
    Hope that helps,
    ~tigeravatar

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    07-22-2013
    Location
    MN
    MS-Off Ver
    excel 2010
    Posts
    2

    Re: Combine rows with common id in column A into one row in excel 2010

    I need them in one row to use mail merge in word and keep all of the information for ONE customer id on the same page. In other words, I have multiple contact names/info for each id but do not want each contact on a separate page. I want one customer id to many records.

  4. #4
    Forum Expert tigeravatar's Avatar
    Join Date
    03-25-2011
    Location
    Colorado, USA
    MS-Off Ver
    Excel 2003 - 2013
    Posts
    5,361

    Re: Combine rows with common id in column A into one row in excel 2010

    sherry64,

    Because this is in the Excel Programming / VBA / Macros section, I'm assuming you want a macro.
    Attached is an example workbook based on the criteria you described.
    It has two sheets, 'Data' and 'Formatted for Mail Merge'
    The Data sheet contains the original data with the columns you stated in your original post.
    The 'Formatted for Mail Merge' starts empty.
    In the 'Data' sheet there is a button labelled "Combine by Common ID for Mail Merge" which is assigned to the following macro:
    Please Login or Register  to view this content.

    When that macro runs, it will gather the data by common ID and display it in the 'Formatted for Mail Merge' worksheet as desired.
    Does that work for you?
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    08-06-2015
    Location
    US
    MS-Off Ver
    MS2010
    Posts
    1

    Re: Combine rows with common id in column A into one row in excel 2010

    Hi,

    I am being looking for something like this for a while and this is the closest one i found, would it be possible to instead of having each value into a different column, added them in to original column separated by a coma, ex

    Original Data
    ID Value a Value b Value c Value d
    10001 a b c d
    10001 d e f g
    10002 r f t y

    Current Macro
    Value a Value b Value c Value d Value a1 Value b1 Value c1 Value d1
    10001 a b c d d e f g
    10002 r f t y


    Need
    Value a Value b Value c Value d
    10001 a, a1 b, b1 c, c1 d, d1
    10002 r f t y


    Thanks in advance for all your help.

    Dof

+ 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. How to combine data from multiple rows when common column headings exist?
    By pkoury in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-01-2013, 10:43 AM
  2. Combine Rows of Data into one Row Excel 2010
    By nickbanta in forum Excel General
    Replies: 2
    Last Post: 03-07-2013, 06:40 PM
  3. Combine two worksheet with common column values
    By L2R in forum Excel General
    Replies: 2
    Last Post: 02-15-2012, 02:23 PM
  4. Replies: 5
    Last Post: 10-15-2009, 11:12 AM
  5. Combine Rows of Data on Common Value
    By jparrish in forum Excel General
    Replies: 1
    Last Post: 01-30-2009, 12:35 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