Remove Duplicates from Each Numeric String, Sort Digits, and Concatenate Them

Problem description & analysis

Here is an Excel file Book1.xlsx:

A

B

1

Number

Result

2

127425

3

2784425

4

121

5

22222

6

9271

Column A contains strings of numbers We are trying to perform distinct on each number, sort it, and enter results in column B. Below is the expected result:

A

B

1

Number

Result

2

127425

12457

3

2784425

24578

4

121

12

5

22222

2

6

9271

1279

Solution & explanation

First, we load add-in ExcelRaq.xll, and then

Select cell B2, enter the following formula: =esproc("=string(int(?1)).split().id().concat()",A2), and drag the cell down to B6 to get results.

Q & A Collection

https://stackoverflow.com/questions/63540928/divide-numbers-into-unique-sorted-digits-displayed-in-a-label-on-a-userform