Reputation: 5791
My sheet has a cell with content:
Tomato, Potato, Beef, Tomato, Salmon, Beef
I want to remove all reoccurring string elements of this cell so that the new cell shows this:
Tomato, Potato, Beef, Salmon
I've tried to achieve this with the UNIQUE
and TEXTJOIN
functions so far, without success. Is it possible to apply FILTER
to a cell?
Upvotes: 0
Views: 55
Reputation: 10573
This shorter one also works
=JOIN(", ",UNIQUE(TRANSPOSE(SPLIT(A1,", "))))
Upvotes: 0
Reputation: 1
or try:
=INDEX(TEXTJOIN(",", 1, UNIQUE(TRIM(FLATTEN(SPLIT(A1, ","))))
Upvotes: 0
Reputation: 27350
Try this:
=TEXTJOIN(", ",true,UNIQUE(TRANSPOSE(SPLIT(substitute(A1," ",),","))))
Upvotes: 2