![]()
Function SortWords(ByVal txt As String) As String Dim e, i As Long With CreateObject("System.Collections.SortedList") For Each e In Split(Application.Trim(txt)) .Item(Format$(1000 - Len(e), "000""" & e & """")) = e Next For i = 0 To .Count - 1 SortWords = Trim$(SortWords & " " & .GetByIndex(i)) Next End With End Function
Bookmarks