Forum Discussion

Excel's avatar
Excel
Iron Contributor
Nov 18, 2021

Question related to Sort

Hello Everyone,

This is my data

like - 

 

After sorting, it will come like this - 

 

I want to come like this :

Person 1, Person 3, Person 4, Person 5, Person 101

So, what should i write formula which sort in ascending order Person 1, Person 3, Person 4, Person 5, Person 101?

 

Please help..??

4 Replies

  • Excel 

    In your example "Person 1" is in cell A2. You can manually enter "1" in cell B2 and then flashfill range B2:B6. Flashfill can be done by pressing ctrl+E when cursor is in cell B3 in this example. 

    Then you can apply sort of range A2:B6 in ascending order by column B as shown in attached pdf file.

  • hansleroy's avatar
    hansleroy
    Iron Contributor

    Hi,
    Strings (letter series) are sorted as strings, that is, alphabetically. I see two solutions:
    - using leading 0 in the number
    Person 001, Person 002 etc
    - or use just numbers (without "Person ")
    Kind regards
    Hans

    • Excel's avatar
      Excel
      Iron Contributor
      Thank you for giving a solution sir.
      Can you please explain example please?
      • hansleroy's avatar
        hansleroy
        Iron Contributor
        I don't know what else I can explain...
        You gave

        Person
        Person 1
        Person 3
        Person 101
        Person 4
        Person 5

        Make that
        Person
        Person 001
        Person 003
        Person 101
        Person 004
        Person 005

Resources