+ Reply to Thread
Results 1 to 4 of 4

Alphabeltical ordering in table - results don't make sens

  1. #1
    Registered User
    Join Date
    02-07-2012
    Location
    NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Alphabeltical ordering in table - results don't make sens

    Dear Excel gurus,

    I have Excel 2007. I have a bunch of columns in a table (in the attached example I show just two). I want to order the rows in the table alphabetically by category. When I try to do so, I get strange results: values like 2.1 and 2.3 are put ahead of values like 1.2.7 and 1.2.8

    I cannot figure out any logic that would explain why this should be the case. In the attached example I tried it two ways using a table (in column B): with category formatted as "general" and formatted as "text". I also tried it with the same data stored in a range rather than a table (see column G) and formatted as "text" I get the same result every time.

    Can anyone please tell me what is the logic behind this ordering? And is there any way to tell Excel to order it so 1.2.7 is on top, then 1.2.8 , then 2.1 etc.?

    Thank you very much.

    Studiosaaphabetical ordering example.xlsx

  2. #2
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Alphabeltical ordering in table - results don't make sens

    The problem is that Excel is seeing those values as numbers and numbers are sorted before text. Easiest way to fix is to put a period after the value i.e. "2.1."
    It used to be that Excel asked if you wanted numbers stored as text sorted as numbers or text but that didn't happen with your file even when I put an ' in front of it and formatted the cells as text. Hmmmm
    ChemistB
    My 2?

    substitute commas with semi-colons if your region settings requires
    Don't forget to mark threads as "Solved" (Edit First post>Advanced>Change Prefix)
    If I helped, Don't forget to add to my reputation (click on the little star at bottom of this post)

    Forum Rules: How to use code tags, mark a thread solved, and keep yourself out of trouble

  3. #3
    Registered User
    Join Date
    02-07-2012
    Location
    NJ, USA
    MS-Off Ver
    Excel 2007
    Posts
    42

    Re: Alphabeltical ordering in table - results don't make sens

    ChemistB,
    Thank you very much. At least now I understand the situation!

    Studiosa

  4. #4
    Forum Guru
    Join Date
    08-05-2004
    Location
    NJ
    MS-Off Ver
    365
    Posts
    13,582

    Re: Alphabeltical ordering in table - results don't make sens

    Thanks for the star tag.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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