user12562215
user12562215

Reputation: 145

Excel - Remove duplicates in a single cell (Non VBA method)

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

Answers (2)

Atifumacaxi
Atifumacaxi

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

Ron Rosenfeld
Ron Rosenfeld

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::*)]"))

enter image description here

Upvotes: 2

Related Questions