+ Reply to Thread
Results 1 to 7 of 7

Grouping data values in one column based on another column (picture included to explain)

  1. #1
    Registered User
    Join Date
    04-17-2024
    Location
    UK
    MS-Off Ver
    2024
    Posts
    3

    Question Grouping data values in one column based on another column (picture included to explain)

    Hello,

    I have not phrased the title well, but I am trying to work out if there is a way in Excel to group/merge multiple cells from one column into a single cell linked to the entry in another column.

    For example I have a sheet with data as in columns A and B, and I am trying to find a way to convert it to look like Columns E and F

    excel.jpg

    Thank you in advance.

  2. #2
    Forum Moderator alansidman's Avatar
    Join Date
    02-02-2010
    Location
    Steamboat Springs, CO
    MS-Off Ver
    MS Office 365 Version 2406 Win 11 Home 64 Bit
    Posts
    23,982

    Re: Grouping data values in one column based on another column (picture included to explai

    With Power Pivot

    Excel 2016 (Windows) 64 bit
    A
    B
    C
    D
    E
    1
    Animal Color Row Labels Colors
    2
    Cat Black Cat Black, White, Ginger
    3
    Cat White Monkey Purple, Red, Black, Brown
    4
    Cat Ginger
    5
    Monkey Purple
    6
    Monkey Red
    7
    Monkey Black
    8
    Monkey Brown
    Sheet: Sheet1

    Create a measure for the colors

    Formula: copy to clipboard
    Please Login or Register  to view this content.
    Attached Files Attached Files
    Alan עַם יִשְׂרָאֵל חַי


    Change an Ugly Report with Power Query
    Database Normalization
    Complete Guide to Power Query
    Man's Mind Stretched to New Dimensions Never Returns to Its Original Form

  3. #3
    Registered User
    Join Date
    04-17-2024
    Location
    UK
    MS-Off Ver
    2024
    Posts
    3

    Re: Grouping data values in one column based on another column (picture included to explai

    Thanks so much, that worked perfectly.

    Cheers

  4. #4
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,730

    Re: Grouping data values in one column based on another column (picture included to explai

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

    Also, if you have not already done so, remember that you can reward anyone who offered you help towards a solution for your issue by clicking the small star icon (* Add Reputation) located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of each of those who offered help.

    Administrative Note:

    Is your forum profile showing the Excel PRODUCT that you need this to work for?

    Members will tailor the solutions they offer to the Office PRODUCT (Excel, NOT Windows) 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 product is for Mac, please also state this.

    The three most recent Excel products are Excel 2019, Excel 2021 and MS365 - if you are using MS365, please give this name along with the version number in your profile (e.g. MS365 Version 2306). This is in the About Excel section further down the Account page.

    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.

  5. #5
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,730

    Re: Grouping data values in one column based on another column (picture included to explai

    If you have 365, then here's a single formula solution:

    =LET(u,UNIQUE(A2:A8),HSTACK(u,BYROW(u,LAMBDA(r,TEXTJOIN(CHAR(10),,FILTER(B2:B8,A2:A8=r))))))
    Attached Files Attached Files

  6. #6
    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. 2406 (Windows 11 23H2 64-bit)
    Posts
    81,730

    Re: Grouping data values in one column based on another column (picture included to explai

    Glad to have helped.

    If that takes care of your original question, please choose Thread Tools from the menu link above and mark this thread as SOLVED. You can also access the SOLVED tag by editing the opening post and choosing SOLVED from the drop-down to the left of the title box.

  7. #7
    Registered User
    Join Date
    04-17-2024
    Location
    UK
    MS-Off Ver
    2024
    Posts
    3

    Re: Grouping data values in one column based on another column (picture included to explai

    Appreciate the expert advice, thanks!

+ 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. Grouping column data based on another column without repeats
    By jack.elvy in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 07-28-2021, 06:44 AM
  2. Replies: 1
    Last Post: 11-06-2020, 05:45 PM
  3. [SOLVED] Grouping Data into one column from various columns based on a value
    By naga in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 08-24-2016, 03:00 AM
  4. Replies: 2
    Last Post: 05-25-2016, 12:46 PM
  5. Grouping rows based on 2 column values
    By anvilofstars in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 01-29-2015, 12:39 PM
  6. Replies: 6
    Last Post: 10-18-2012, 03:10 PM
  7. Grouping rows based on column values and comparing row values
    By bernborough in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-27-2010, 10:18 AM

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