Quote Originally Posted by KingTamo View Post
dog cat tree hair pepper she moon sun cat tree three pepper

** pepper three hair moon tree cat dog she sun
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