+ Reply to Thread
Results 1 to 9 of 9

How to concatenate email addresses from different rows into 1 line with comma separator

  1. #1
    Registered User
    Join Date
    05-30-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    95

    How to concatenate email addresses from different rows into 1 line with comma separator

    I have a list like below



    How can I make it to like below?


    Thanks!
    Attached Files Attached Files
    Last edited by ohlalayeah; 01-17-2013 at 09:33 AM.

  2. #2
    Registered User
    Join Date
    02-28-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: How to concatenate email addresses from different rows into 1 line with comma separato

    How many rows are we talking? The simplest way would be to put a filter on the name column, select the name you desire, then in the adjacent column have something like -
    Please Login or Register  to view this content.
    where B2:b3 is your range of email addresses for Peter.

    then repeat for the remaining names.

    I'll think of a quicker way in a minute

  3. #3
    Registered User
    Join Date
    05-30-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: How to concatenate email addresses from different rows into 1 line with comma separato

    I have more than 10000 rows, any better way?

  4. #4
    Valued Forum Contributor ron2k_1's Avatar
    Join Date
    09-30-2009
    Location
    Not the USA
    MS-Off Ver
    Excel 2003, 2007
    Posts
    606

    Re: How to concatenate email addresses from different rows into 1 line with comma separato

    by code, go here:
    http://www.cpearson.com/Excel/stringconcatenation.aspx

    by formula I'd do it like this (Assuming emails start from A1):
    1. In B1 insert =A1
    2. In B2 insert=B1&","&A2
    3. Drag down B2 as far as needed
    Ron
    Knowledge is knowing that a tomato and pepper are fruits. Wisdom is knowing whether to put these in a fruit salad

    Kindly

    [1] Use code tags. Place "[code]" before the first line of code and "[/code"]" after the last line of code. Exclude quotation marks
    [2] Mark your post [SOLVED] if it has been answered satisfactorily by editing your original post in advanced mode.
    [3] Thank (using the little scale) those that provided useful help; its nice and its very well appreciated

  5. #5
    Registered User
    Join Date
    05-30-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: How to concatenate email addresses from different rows into 1 line with comma separato

    Thanks, but I need a formula that can automatically concatenate email addresses that with same name under "Name" column. I have more than 10000 rows of email address in which some are belonged to same people.

  6. #6
    Registered User
    Join Date
    02-28-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: How to concatenate email addresses from different rows into 1 line with comma separato

    There's probably a simpler way but this works.

    This involves a few steps but I've achieved what your after.

    Assuming your list of names are in column A and the email addresses are in column B

    First copy the list of names and remove any duplicates, fairly straight forward.

    Then transpose the list of names (horizontally) starting at E1. Under the first name do a VLOOKUP

    Please Login or Register  to view this content.
    where E$1 is your first name in the horizontal list (my short list of email addresses run from B1:B6, yours will probably be B1:B1000)

    This will display the first email address for this person. Drag the formula down until you begin to see #N/A (we can remove these later along with the duplicates.)
    repeat the process for the long list of names by dragging the formula underneath each name and down.

    Now you have all the email address for each person below their name. Copy the entire range to a separate sheet and paste special (Values) and remove all formatting and duplicates.

    Now for the concatenation.

    Below the first column of names in an empty cell type:

    Please Login or Register  to view this content.
    before you press enter, press F9. (you'll see the list of names in the formula bar.) Delete the curly brackets{} from the start and the end, and also the last comma on the last email address. Then enclose the string in normal brackets() and type concatenate before the first bracket like this

    Please Login or Register  to view this content.
    Then press enter and you'll be left with this:

    Please Login or Register  to view this content.
    You should then be able to drag this across for the list of names.

    Hope this helps. Just an idea - had a 5 minutes to spare .

    Dave
    Last edited by djm601; 01-17-2013 at 06:22 AM.

  7. #7
    Registered User
    Join Date
    05-30-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: How to concatenate email addresses from different rows into 1 line with comma separato

    Thanks, can you put into an excel file and upload here? Then I'll have better understanding .

  8. #8
    Registered User
    Join Date
    02-28-2012
    Location
    England
    MS-Off Ver
    Excel 2007
    Posts
    49

    Re: How to concatenate email addresses from different rows into 1 line with comma separato

    Book1.xlsx

    Here you go.
    There are two sheets on the workbook.

  9. #9
    Registered User
    Join Date
    05-30-2012
    Location
    Hong Kong
    MS-Off Ver
    Excel 2003
    Posts
    95

    Re: How to concatenate email addresses from different rows into 1 line with comma separato

    this seems not a simple method. remember I have more than 100000 records, in which there are around 8000 people, in those 8000 people some of them have more than 1 email addresses. Is it to use MATCH function to aggregate the email addresses belonged to same persons and concatenate the addresses in 1 line separated with comma or semi-colon? I attached my sample file in first post
    Last edited by ohlalayeah; 01-17-2013 at 09:45 AM.

+ 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