Reputation: 145
Is there a non-VBA method to remove duplicates in a single cell. For example, in a cell I have values like ABC, ABC, EFG, EFG, EFG, MN, and i want my final output to be ABC, EFG, MN
Thanks!
Upvotes: 0
Views: 914
Reputation: 1
Non-vba (and no formulas) ?
1 - You could separate text with comma, like csv file (shortcut is Alt + A + E)
2 - After this, transpose it, so every column will be line to line
3 - Then, you can remove duplicates
Hope my ideia helps you.
Upvotes: -1
Reputation: 60174
Depending on your version of Excel, and observing that the separator is comma-space
, you can try:
=TEXTJOIN(", ",TRUE,FILTERXML("<t><s>" & SUBSTITUTE(J1,", ","</s><s>") & "</s></t>","//s[not(.=following-sibling::*)]"))
Upvotes: 2