+ Reply to Thread
Results 1 to 12 of 12

Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

  1. #1
    Registered User
    Join Date
    08-26-2009
    Location
    Helsinki
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    10

    Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

    Hi!

    Could someone help me with this? I should sort numbers in ascending order from left to right, but the numbers sort only from right to left.

    This is what I want:

    1.3.2.2
    1.4.1
    2.1.1.1.1
    3.2.3.12
    3.3.1

    And this is how it goes:

    2.1.1.1.1
    3.3.1
    1.4.1
    1.3.2.2
    3.2.3.12

    There are also numbers that have letter at the end (1.2.3a), and the cell format is text.

  2. #2
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

    To best describe or illustrate your problem you would be better off attaching a dummy workbook, the workbook should contain the same structure and some dummy data of the same type as the type you have in your real workbook - so, if a cell contains numbers & letters in this format abc-123 then that should be reflected in the dummy workbook.

    If needed supply a before and after sheet in the workbook so the person helping you can see what you are trying to achieve.

  3. #3
    Registered User
    Join Date
    08-26-2009
    Location
    Helsinki
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    10

    Re: Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

    I'm sorry for not being clear with my problem (it seems so clear in my head...). Attached a document with the numbers I would like to have sorted. Numbers are chapter numbers, so that is why I would like to be able to sort them in order so that 1.10.3 is before 3.2.1 etc.
    Attached Files Attached Files

  4. #4
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

    is there a common limit to the number of sub chapters - ie the most times you use a period delimiter (.) ?

    in basic terms you need to convert the text sting into a numeric equivalent such that it can be sorted, in text terms 13a is < 2b given the first character of the string 13a ("1") is less than first character of 2b ("2") in exactly the same way that "axe" is < "baa" given a precedes b ...
    to create the numeric equivalents we need to know more re: the various chapter constructs...

  5. #5
    Registered User
    Join Date
    08-26-2009
    Location
    Helsinki
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    10

    Re: Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

    There are four (4) period delimiters at the most. Letters at the end of the numbers are rare, so I could easily just take them away, if that helps somehow.

    This may be too complicated for me to do; but thank you for your advice anyway!

  6. #6
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

    And final questions that I should have asked earlier....

    1: Letters

    do the alpha character(s) appear only in the final sub-chapter or can they appear in any sub-chapter, eg

    1.2.3.4a only or 1.2.3a.4

    2: Numbers

    is there a limit to the max number that may appear as a sub-chapter ? eg 0-100, 0-1000 etc

  7. #7
    Registered User
    Join Date
    08-26-2009
    Location
    Helsinki
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    10

    Re: Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

    1: Letters

    alpha character appear only in the final sub-chapter like this 1.2.3.4a

    2: Numbers

    the max number that may appear as a sub-chapter is 0-50

  8. #8
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

    Not elegant... basically B is to normalise the chapter references (so that all conform to the possibility of 4 sub chapter references), C:G then weight the significance of each chapter/sub-chapter value and I then Sums those weights... you can then sort the data first by I and then by A (to handle alphas).
    Attached Files Attached Files

  9. #9
    Registered User
    Join Date
    08-26-2009
    Location
    Helsinki
    MS-Off Ver
    Excel 2007 and 2010
    Posts
    10

    Re: Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

    Thank you for your quick help!

  10. #10
    Registered User
    Join Date
    08-27-2009
    Location
    bishkek, kyrgyzstan
    MS-Off Ver
    Excel 2003
    Posts
    5

    Re: Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

    Pls moderator help in formula as follows:

    there must be numbers between 0-100. I want to show this numbers, in different cells, with nubers between 1-5.
    For example:
    - if the inserted number is between 0-20, then it is shown with 1;
    - if the inserted number is between 21-40, then with 2 for each inserted number;
    - if the number is between 41-60, with 3 for each inserted number;
    - for the numbers between 61-80, with 4 for each of them;
    - for the numbers between 81-100, with 5.

    Thanks for attention....

  11. #11
    Forum Guru DonkeyOte's Avatar
    Join Date
    10-22-2008
    Location
    Northumberland, UK
    MS-Off Ver
    O365
    Posts
    21,531

    Re: Sorting numbers like 1.2.2.3, 12.4.2.3 etc.

    uluk,

    Your post does not comply with Rule 2 of our Forum RULES. Don't post a question in the thread of another member -- start your own thread. If you feel it's particularly relevant, provide a link to the other thread.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1