+ Reply to Thread
Results 1 to 9 of 9

Group related fields together

  1. #1
    Registered User
    Join Date
    02-22-2022
    Location
    Mexico
    MS-Off Ver
    Office 2021
    Posts
    8

    Question Group related fields together

    Hey guys,

    my biggest problem is that I dont know how to discribe what I want... otherwise I could goolge it easily...
    I got a list with 100+ names and cities and i want to collect who is living in the same city.

    Here an example:

    Name City living in the same City
    Hans München
    Peter Berlin Stefan,Michael
    Ben Hamburg Nadine
    Nadine Hamburg Ben
    Stefan Berlin Peter,Michael
    Michael Berlin Stefan,Peter

    Hans is the only one coming from München so the field is blank because I dont want to list its own name.
    Peter is living in Berlin as well as Stefan and Michael. Therefore it says "Stefan,Michael".

    Is there a function to do the third column? Important is that the names are seperated with a comma.

    Thanks in advance!
    stinkzor

  2. #2
    Forum Expert
    Join Date
    09-07-2014
    Location
    Israel
    MS-Off Ver
    office 365 for MAC
    Posts
    3,105

    Re: Group related fields together

    Hi,
    please upload your sample clause in excel, it's hard to tell how your columns are divided.

    See the yellow banner at the top of the page for more instructions.

  3. #3
    Registered User
    Join Date
    02-22-2022
    Location
    Mexico
    MS-Off Ver
    Office 2021
    Posts
    8

    Re: Group related fields together

    Hey Belinda200,

    thanks for your fast reply. Please find attached my sample.xlsx.

    Best regards
    stinkzor
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,822

    Re: Group related fields together

    Being on version 2022 I assume you have access to the FILTER formula. If so, in C2 try this:

    =TEXTJOIN(", ",TRUE,TRANSPOSE(FILTER($A$2:$A$7,($B$2:$B$7=B2)*($A$2:$A$7<>A2),"")))

    and copy down.

  5. #5
    Registered User
    Join Date
    02-22-2022
    Location
    Mexico
    MS-Off Ver
    Office 2021
    Posts
    8

    Re: Group related fields together

    Quote Originally Posted by Gregb11 View Post
    Being on version 2022 I assume you have access to the FILTER formula. If so, in C2 try this:

    =TEXTJOIN(", ",TRUE,TRANSPOSE(FILTER($A$2:$A$7,($B$2:$B$7=B2)*($A$2:$A$7<>A2),"")))

    and copy down.
    ty for your help!
    I tryed your function but I get some errors (maybe because I got an german excel verstion) so I had to adjust it a little bit:
    =TEXTKETTE(", ";WAHR;MTRANS(FILTER($A$2:$A$7;($B$2:$B$7=B2)*($A$2:$A$7<>A2);"")))

    Basically it works, but there is only a comma at the beginning of the cell and the word "true". Can this still be adjusted?

    Thanks!
    Attached Files Attached Files

  6. #6
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,822

    Re: Group related fields together

    When I open your file, it has the CONCAT. Your version (if you're on Version 2022) you should have the TEXTJOIN formula available - it came out in V2019. I've attached the file. See if it works for you when you open it.
    Attached Files Attached Files

  7. #7
    Forum Moderator AliGW's Avatar
    Join Date
    08-10-2013
    Location
    Retired in Ipswich, Suffolk, but grew up in Sawley, Derbyshire (England)
    MS-Off Ver
    MS 365 Subscription Insider Beta Channel v. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,351

    Re: Group related fields together

    Administrative Note:

    Members will tailor the solutions they offer to the version (NOT release number like 2022) of Office (Excel) that you have. Please check that your forum profile is up-to-date in this respect. If you aren't sure, in Excel go to File | Account and report what it says below the MS logo at the top of that page. If your version is for Mac, please also state this. Thanks.
    Ali


    Enthusiastic self-taught user of MS Excel who's always learning!
    Don't forget to say "thank you" in your thread to anyone who has offered you help.
    You can reward them by clicking on * Add Reputation below their user name on the left, if you wish.

    Forum Rules (updated August 2023): please read them here.

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

    Re: Group related fields together

    In German:

    =TEXTVERKETTEN(", ";WAHR;MTRANS(FILTER($A$2:$A$7;($B$2:$B$7=B2)*($A$2:$A$7<>A2);"")))
    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.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  9. #9
    Registered User
    Join Date
    02-22-2022
    Location
    Mexico
    MS-Off Ver
    Office 2021
    Posts
    8

    Re: Group related fields together

    Gregb11: tyvm! You saved me a lot of time!

    AliGW: You are right, I corrected it to Office 2021.

    Thanks
    stinkzor

+ 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. [SOLVED] Is this a support group for excel related files?
    By iamjen0802 in forum Excel General
    Replies: 4
    Last Post: 01-20-2021, 02:23 AM
  2. [SOLVED] clear used area, then copy related fields if match is made
    By drewship in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-22-2016, 09:31 AM
  3. How to group values related to each minute
    By Junpan in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 04-16-2014, 07:02 PM
  4. Replies: 0
    Last Post: 03-22-2013, 09:08 AM
  5. Can query results be moved to one row for related fields?
    By jgomez in forum Access Tables & Databases
    Replies: 1
    Last Post: 11-01-2012, 10:28 AM
  6. reg. sorting of to items and their related fields
    By xpushkar in forum Excel General
    Replies: 7
    Last Post: 07-22-2011, 06:11 AM
  7. Moving Related Fields
    By Manager that needs help in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-15-2006, 12:15 AM

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