+ Reply to Thread
Results 1 to 6 of 6

Excel function or script for concatenate all values from B:B for same columns in A:A

  1. #1
    Registered User
    Join Date
    11-27-2012
    Location
    Teplice
    MS-Off Ver
    2010
    Posts
    71

    Question Excel function or script for concatenate all values from B:B for same columns in A:A

    Hi,
    can anybody help me in this task as in the header?
    Example can be this one... but... i have sheet with about 30thousands of rows with these values

    So, the example:


    A B
    1 a
    1 b
    1 c
    1 d
    2 aa
    2 bb


    result can be:

    A B C
    1 a a b c d
    1 b a b c d
    1 c a b c d
    1 d a b c d
    2 aa aa bb
    2 bb aa bb


    Thank you very much,
    Pavel

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Excel function or script for concatenate all values from B:B for same columns in A:A

    Hi,

    One non macro way is as follows

    1. Start your list on row 2
    2. In C2 enter =IF(A2<>A1,B2,C1&B2)
    3. In D2 enter =A2<>A3
    4. Copy C2:D2 down to the last row.
    5. Filter the data on column D for the value True

    I'm assuming you only want the two unique rows in your example and not all 6 rows with duplicates.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Excel function or script for concatenate all values from B:B for same columns in A:A

    macro way starting on row 2
    Please Login or Register  to view this content.
    If solved remember to mark Thread as solved

  4. #4
    Registered User
    Join Date
    11-27-2012
    Location
    Teplice
    MS-Off Ver
    2010
    Posts
    71

    Re: Excel function or script for concatenate all values from B:B for same columns in A:A

    Wow, this is very good solution. I mean Macro way...

    thank you very much in advance...

    there is just one little mistake as i did not noticed that in the example.

    I would like if all the values will be in one column separated by comma. Is this possible to write here too, please?

    Anyway, this solution is also so good... i am starting to like macro

  5. #5
    Forum Expert
    Join Date
    07-15-2012
    Location
    Leghorn, Italy
    MS-Off Ver
    Excel 2010
    Posts
    3,431

    Re: Excel function or script for concatenate all values from B:B for same columns in A:A

    Please Login or Register  to view this content.

  6. #6
    Registered User
    Join Date
    11-27-2012
    Location
    Teplice
    MS-Off Ver
    2010
    Posts
    71

    Re: Excel function or script for concatenate all values from B:B for same columns in A:A

    Great!

    Thank you very much.

+ 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.6.0 RC 1