1. Welcome to Chandoo.org Forums. Short message for you

    Hi Guest,

    Thanks for joining Chandoo.org forums. We are here to make you awesome in Excel. Before you post your first question, please read this short introduction guide. When posting or responding to questions please remember our values at Chandoo.org are: Humility, Passion, Fun, Awesomeness, Simplicity, Sharing Remember that we have people here for whom English is not there first language and we need to allow for this in our dealings.

  2. Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User


  3. When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Sort words from the end

Discussion in 'Ask an Excel Question' started by Pampos, Aug 11, 2017.

  1. Pampos

    Pampos New Member

    Hello. I want, for example, to sort

    big house
    small tree
    red cat
    green house

    alphabetically but start from the last letter.

    For example, the result must be

    small tree
    big house
    green house
    red cat

    Is that possible with excel? I already tried =RIGHT(A1,1) but is doesn't help me for the purpose I want the sorting.

    Do you know if it is easier to do that in word?

  2. NARAYANK991

    NARAYANK991 Excel Ninja

    Hi ,

    It is easy if you use VBA ; is that an option ?

    If yes , then see the attached file.


    Attached Files:

  3. p45cal

    p45cal Well-Known Member

    You can add a user-defined function such as Reverse which will take your strings and reverse them. Then you can sort on that new column. See attached which has such a function but I have left it unsorted, ready for you to do a standard sort on column B.


    And the code for that function:
    Code (vb):
    Function Reverse(TheString)
    For i = Len(TheString) To 1 Step -1
      Reverse = Reverse & Mid(TheString, i, 1)
    Next i
    End Function

    Attached Files:

  4. Pampos

    Pampos New Member

    Many thanks. REVERSETEXT is working as I want to.

Share This Page