Remove duplicate character in a cell

Viewed 29

I have struggle with the following case:

In cell A1 = (a)(f)(a)(b)(a), cell A2 = (d)(a)(c)(d)(g)(d)(a)(d)

How can I get the result as follow:

Cell A1= (a)(b)(f) Cell A2 = (a)(c)(d)(g)

I use substitute only substitute one (a) with “”.

Is there is an excel formula and vba to get the result.

Thank, Joe

1 Answers

If you have TEXTSPLIT:

=CONCAT("("&SORT(UNIQUE(TEXTSPLIT(A1,,"(",1))))

Related