Here are the formulas to sort within a single cell.
However, you will need Excel that reflects newer features such as Microsoft365.
Please make changes in the areas in red.
The cell 2c5e31ad4b is reordered to 12345abcde.
Change the last 1 to -1 to sort in descending order.
The cell 2c5e31ad4b is reordered to edcba54321.