Created
December 20, 2019 14:00
-
-
Save estevecastells/b95b668cec6aec1189c1c1b2dc56ac26 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function fncSortStr(strPassed As String) As String | |
Dim Temp As String | |
Dim I As Integer | |
While Len(strPassed) | |
Temp = Left(strPassed, 1) | |
For I = 2 To Len(strPassed) | |
If Mid(strPassed, I, 1) < Temp Then | |
Temp = Mid(strPassed, I, 1) | |
End If | |
Next I | |
fncSortStr = fncSortStr & Temp | |
strPassed = Left(strPassed, InStr(1, strPassed, Temp) - 1) & _ | |
Mid(strPassed, InStr(1, strPassed, Temp) + 1) | |
Wend | |
End Function | |
=TRIM(clean(fncSortStr(C2)))
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
=TRIM(fncSortStr(C2))