This has also been posted to AND SOLVED Reddit's Excel subreddit. You can find it by searching for "Merging duplicate rows based on comma-delimited cells" on the Excel Subreddit page.
I would post the link here for reference because that's what the rules state, but I am a new user and currently don't have permissions to provide the link here in my post.
I want to merge duplicate data that has comma-delimited values in the cells. I know there are ways to merge duplicate rows if the cell contents are Exactly the same, but if the cells contain Comma-delimited values, how could I check if there are duplicates within that? For example: "A,B" in a cell would be considered different from a cell containing "B,A" even though they contain the same values, just in a different order. Is there a macro or formula to get this done for cells that have some similar comma-delimited entries and some different entries? For example:
In the following table, the 1st column has matching values. Based on the 1st column, I want to merge the values like so:
From:
A,B,C,D E A,B,F B,E 1,2 3 2 3,4 aaaa,bbb cccc
Becomes:
A,B,C,D,F B,E 1,2 3,4 aaaa,bbb cccc
The script/formula would recognize that the 1st and 2nd rows contain duplicates and would merge all of it into 1 cell, despite the fact that the 1st row doesn't have F and the 2nd row doesn't have D. Also notice how the "aaaa,bbb cccc" row hasn't changed because there are no duplicates.
Bookmarks