+ Reply to Thread
Results 1 to 8 of 8

How to group different records in one cel seperated by a comma

Hybrid View

  1. #1
    Registered User
    Join Date
    04-13-2022
    Location
    Brussels
    MS-Off Ver
    MS365
    Posts
    12

    How to group different records in one cel seperated by a comma

    Hello

    i have underlying data:

    A 1
    A 7
    A 3
    B 8
    B 9
    C 4
    C 5
    C 2
    C 1

    I would like to group everything from colomn 2 in one cell, seperated by a pointcomma. Giving me this:

    A 1;7;3
    B 8;9
    C 4;5;2;1

    How could i do that please?
    Thanks a lot.
    See attached for the ecxel example
    Attached Files Attached Files
    Last edited by Kouemaha; 09-07-2023 at 09:25 AM.

  2. #2
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: How to group different records in one cel seperated by a comma

    what version of excel do you have ?

    textjoin and filter should work

    in D1 put
    =UNIQUE(A1:A9)
    in E1 put and copy down
    =TEXTJOIN(" , ",,FILTER($B$1:$B$9,$A$1:$A$9=D1))

    Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet.

    A sample sheet would help here, and possibly will enable a quicker and more accurate solution for you.


    The forum does allow for spreadsheets to be uploaded direct to the forum -

    Please see the Yellow Banner at the top of the page explaining how to attach a sample spreadsheet

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Here are the instructions, found at the top of the page again
    Post a small Excel sheet (not a picture) showing realistic & representative sample data WITHOUT confidential information (10-20 rows, not thousands...) and some manually calculated results. For a new thread (1st post), scroll to Manage Attachments, otherwise scroll down to GO ADVANCED, click, and then scroll down to MANAGE ATTACHMENTS and click again. Now follow the instructions at the top of that screen.
    Attached Files Attached Files
    Wayne
    if my assistance has helped, and only if you wish to , there is an "* Add Reputation" on the left hand side - you can add to my reputation here

    If you have a solution to your thread - Please mark your thread solved do the following: >
    Select Thread Tools-> Mark thread as Solved. To undo, select Thread Tools-> Mark thread as Unsolved.

  3. #3
    Registered User
    Join Date
    04-13-2022
    Location
    Brussels
    MS-Off Ver
    MS365
    Posts
    12

    Re: How to group different records in one cel seperated by a comma

    Quote Originally Posted by etaf View Post
    what version of excel do you have ?

    textjoin and filter should work

    in D1 put
    =UNIQUE(A1:A9)
    in E1 put and copy down
    =TEXTJOIN(" , ",,FILTER($B$1:$B$9,$A$1:$A$9=D1))

    Note: Images are difficult to see , and also requires that I input all the data myself, which means I may make an error, which is very time consuming, and from my point of view less likely to get a response, if a complicated spreadsheet.

    A sample sheet would help here, and possibly will enable a quicker and more accurate solution for you.


    The forum does allow for spreadsheets to be uploaded direct to the forum -

    Please see the Yellow Banner at the top of the page explaining how to attach a sample spreadsheet

    A good sample workbook has just 10-20 rows of representative data that has been desensitised. It also has expected results mocked up, relevant cells highlighted and a few explanatory notes.

    Here are the instructions, found at the top of the page again
    thank you
    i have attached an example workbook.
    i can use the TEXTJOIN formule, but unsure how to make it work in combining the first column A

  4. #4
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: How to group different records in one cel seperated by a comma

    i posted a smaple sheet with the formula in

    no need to quote my entire post again

    what info do you need ?

    also if you update your profile for the version of excel you have , will help
    as textjoin() appears to be in 2019 version but filter is NOT until 2021 according to MS site

    so if you have 2021 or 365 - it should work - if not then another formula will be needed - but who knows , need the version you have

  5. #5
    Registered User
    Join Date
    04-13-2022
    Location
    Brussels
    MS-Off Ver
    MS365
    Posts
    12

    Re: How to group different records in one cel seperated by a comma

    thanks, i have 365

  6. #6
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2406
    Posts
    44,662

    Re: How to group different records in one cel seperated by a comma

    either:
    =TEXTJOIN(";",,FILTER($B$2:$B$6,$A$2:$A$6=A2))

    copied down, or (delete all expected results first)

    =BYROW(A2:A6,LAMBDA(x,TEXTJOIN(";",,FILTER(B2:B6,A2:A6=x))))
    Attached Files Attached Files
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU

  7. #7
    Forum Expert etaf's Avatar
    Join Date
    10-22-2004
    Location
    Wittering, West Sussex, UK
    MS-Off Ver
    365 (Mac OSX) (16.92 (24120731))
    Posts
    9,118

    Re: How to group different records in one cel seperated by a comma

    ok.,
    =TEXTJOIN(";",,FILTER($B$1:$B$9,$A$1:$A$9=A2))
    did you want a semi-colon or comma as delimiter - you show both

    change profile to show 365 and the version, as newest will not mean much overtime
    Attached Files Attached Files

  8. #8
    Registered User
    Join Date
    04-13-2022
    Location
    Brussels
    MS-Off Ver
    MS365
    Posts
    12

    Re: How to group different records in one cel seperated by a comma

    great, thanks all, got it working

+ 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. Count Comma Seperated Cell Value by Item Group
    By furkanyasar in forum Excel General
    Replies: 6
    Last Post: 01-18-2022, 06:08 AM
  2. [SOLVED] Name (Value) in comma seperated list
    By sl968 in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-16-2020, 05:52 PM
  3. [SOLVED] Group & concatenate data in comma seperated format
    By aashishni in forum Excel Programming / VBA / Macros
    Replies: 14
    Last Post: 10-19-2018, 08:29 AM
  4. Comma Seperated Values UFT-8 Save in VBA
    By Matty5894 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 08-12-2015, 12:39 PM
  5. Comma Seperated Value Files
    By TheRevenant in forum Excel General
    Replies: 4
    Last Post: 06-12-2013, 01:22 AM
  6. Have 300 cells, want them in one, seperated by comma
    By AdamParker in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-04-2009, 01:58 PM
  7. How to split a value seperated by comma?
    By Ticktockman in forum Excel General
    Replies: 2
    Last Post: 03-23-2006, 12:25 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