+ Reply to Thread
Results 1 to 9 of 9

Duplicate cell values - Group by column

  1. #1
    Registered User
    Join Date
    10-20-2017
    Location
    Dublin, Ireland
    MS-Off Ver
    2202 (Build 14931.20858 Click-to-Run)
    Posts
    50

    Thumbs up Duplicate cell values - Group by column

    Dia dhuit ExcelForum friends

    1. Attached file
    2. Taskcards in 4 columns
    3. Each column header is 'check package'
    4. I want to know which 'check package' each taskcard is in!
    5. For example, 050000-SUP-10000-2 is in A1,A2,A3 & A4.
    6. 112000-SUP-10000-1 is only in A2

    Could you give me a hand?

  2. #2
    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,644

    Re: Duplicate cell values - Group by column

    Are you using a Mac? If so, do you have Power Query?
    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.

  3. #3
    Registered User
    Join Date
    10-20-2017
    Location
    Dublin, Ireland
    MS-Off Ver
    2202 (Build 14931.20858 Click-to-Run)
    Posts
    50

    Re: Duplicate cell values - Group by column

    Hi AliGW,

    I'm afraid not, I'm using windows!

  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,644

    Re: Duplicate cell values - Group by column

    That's OK - in that case, I don't think the version of Excel stated in your user profile is correct - please confirm which version you are using.

    Have a look at the attached. If it is what you want and you have a recent version of Excel, I can explain how to do it. This is a dynamic solution - you can refresh the results table if the master table changes.

    Here's the M code:

    Please Login or Register  to view this content.
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    10-20-2017
    Location
    Dublin, Ireland
    MS-Off Ver
    2202 (Build 14931.20858 Click-to-Run)
    Posts
    50

    Thumbs up Re: Duplicate cell values - Group by column

    Thanks AliGW,

    1. I've updated my stated Excel version
    2. Attached is what I'm looking for!
    3. Could you let me know how you use the 'M' code?


  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. 2404 (Windows 11 22H2 64-bit)
    Posts
    80,644

    Re: Duplicate cell values - Group by column

    OK - here's what you need to do:

    1. In the original workbook (not my copy) select the whole of your source table (A1 to D104).
    2. With this range selected, go to the Data ribbon and click on From Table/Range in the Get & Transform area of the ribbon (on the left). This will load the table into PowerQuery.
    3. In the PQ editor that is now open, click on Advanced Editor in the ribbon (near the left).
    4. In the dialog that opens, replace all the code that appears with the code that I gave you above, then click on Done (bottom right).
    5. Finally, click on Close & Load at the far left of the PQ ribbon.

    All you need to do now is remember to refresh the table when changes are made to the source table (Refresh on the Data ribbon). This can be automated by setting auto-refresh in the query properties. To access the query properties, click Queries & Connections on the Data ribbon, then right-click the query in the pane that appears to the right and choose Properties.

  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,644

    Re: Duplicate cell values - Group by column

    If that takes care of your original question, please select Thread Tools from the menu link above and mark this thread as SOLVED. Thanks.

  8. #8
    Registered User
    Join Date
    10-20-2017
    Location
    Dublin, Ireland
    MS-Off Ver
    2202 (Build 14931.20858 Click-to-Run)
    Posts
    50

    Re: Duplicate cell values - Group by column

    Good Morning AliGW,
    • The solution has solved my issue.
    • I'll try to learn to use the Power Query tool , I've never used it before.
    • Thank you for all your help!


  9. #9
    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,644

    Re: Duplicate cell values - Group by column

    You're welcome!

    Please do come back and start a new thread on PQ if you need any guidance. It's a fantastic tool - I use it literally every day now.

+ 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. Replies: 1
    Last Post: 10-12-2018, 12:19 PM
  2. [SOLVED] Remove duplicate values in Field cell from same column
    By nironto in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-22-2016, 01:40 AM
  3. [SOLVED] Find duplicate rows based on two column values and group
    By kevivu in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 07-30-2015, 12:10 AM
  4. Generating a Group ID for the duplicate values
    By Nanjunda in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 09-30-2013, 08:37 AM
  5. Need macro that will group rows with duplicate data in a particular column together
    By MineThatBird in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 09-08-2013, 07:32 PM
  6. [SOLVED] Combine duplicate, sequential values, then group into a range
    By engineerlady in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 01-26-2013, 10:28 AM
  7. How can I find duplicate values in a column and then change the value of a cell?
    By Excelcod in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 07-06-2011, 02:59 PM

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