Conor Collins
Conor Collins

Reputation: 33

Is there a function in google sheets that will return only the unique characters in a string?

Is there a function in google sheets that will return only the unique characters in a string?

for example if I input "RRRWWWGGRWG"

it will return "RWG"

Upvotes: 3

Views: 1526

Answers (2)

Tom Sharpe
Tom Sharpe

Reputation: 34275

Or you can use Mid and Sequence:

=ArrayFormula(join(,unique(mid(A1,sequence(len(A1)),1))))

Upvotes: 0

player0
player0

Reputation: 1

sure, try:

=JOIN(, UNIQUE(TRANSPOSE(REGEXEXTRACT(A2, REPT("(.)", LEN(A2))))))

0

Upvotes: 4

Related Questions