Nov 13 2022 04:04 PM
Usually I can think of at least a thought process of where to go, but stumped on this one...
I have a text field with a six digit text string, as an example '201210', i would like to sort those six digits into a new text string, so in the example above i would end up with a new text string '221100'.
Anyone have an idea where to start with th
Nov 13 2022 06:19 PM
Solution@DarrylJP Below formula may help-
=LET(x,SUBSTITUTE(A1,"'",""),y,MID(x,SEQUENCE(LEN(x)),1),"'"&CONCAT(SORT(y,,-1))&"'")
Nov 13 2022 07:40 PM - edited Nov 13 2022 07:59 PM
If you have the input text in A1, then:
=LET(x, SUBSTITUTE(A1,"'",""),
"'"&TEXTJOIN("",,SORT(MID(x, SEQUENCE(LEN(x)),1),,-1))&"'")
it returns: '221100'
Nov 14 2022 05:03 AM
Nov 13 2022 06:19 PM
Solution@DarrylJP Below formula may help-
=LET(x,SUBSTITUTE(A1,"'",""),y,MID(x,SEQUENCE(LEN(x)),1),"'"&CONCAT(SORT(y,,-1))&"'")