+ Reply to Thread
Results 1 to 6 of 6

Concatenate dynamically

  1. #1
    Registered User
    Join Date
    06-01-2006
    Posts
    36

    Concatenate dynamically

    I don't know if the title describes it, but here is what I can't figure out.

    I have names of people that each choose one type of fruit. Some people choose apples, some people choose grapes, and some choose oranges. In a different part of the worksheet, I want to list each of the fruit. Next to each fruit, I want to list the names of each person who chose that fruit with a comma separating them. i don't know where to begin. Attached is a simple sample. Thanks for any help you can provide.
    Attached Files Attached Files

  2. #2
    Registered User
    Join Date
    07-27-2006
    MS-Off Ver
    MS Office 2007
    Posts
    79
    If your list is not too extensive, this should work. Else, you may have quite a tough time with repeating the CONCATENATE function.

    or in place of CONCATENATE, you could use the "&" command

    hope this is what you want...
    Attached Files Attached Files
    TL

    https://sites.google.com/site/teelim/
    My page of "not so useful" spreadsheets

  3. #3
    Registered User
    Join Date
    06-01-2006
    Posts
    36
    Thanks a bunch. I appreciate the help. I think it will work well.

  4. #4
    Forum Contributor VBA Noob's Avatar
    Join Date
    04-25-2006
    Location
    London, England
    MS-Off Ver
    xl03 & xl 07(Jan 09)
    Posts
    11,988
    Hi,

    You could miss a couple of steps with the attached

    =SUBSTITUTE(TRIM(CONCATENATE(C2," ",C3," ",C4," ",C5," ",C6))," ",",")
    =SUBSTITUTE(TRIM(CONCATENATE(D2," ",D3," ",D4," ",D5," ",D6))," ",",")
    =SUBSTITUTE(TRIM(CONCATENATE(E2," ",E3," ",E4," ",E5," ",E6))," ",", ")

    VBA Noob

  5. #5
    Registered User
    Join Date
    06-01-2006
    Posts
    36
    Thanks to you as well VBA. That is nice and tidy. I like it.

  6. #6
    Registered User
    Join Date
    07-27-2006
    MS-Off Ver
    MS Office 2007
    Posts
    79
    Quote Originally Posted by daddioja
    Thanks a bunch. I appreciate the help. I think it will work well.
    Glad that I was able to help

+ 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