+ Reply to Thread
Results 1 to 7 of 7

Sorting numeric and alphanumeric normally

  1. #1
    Registered User
    Join Date
    12-15-2012
    Location
    RI
    MS-Off Ver
    Excel 2003
    Posts
    3

    Sorting numeric and alphanumeric normally

    Before I go completely out of my mind on this, could someone please point me how to do this? I have tried fromatting as text, numbers, as "general". I just cannot get this to work. This is a list of town map and parcels, the parcels have all sorts of letters and some do not. Similar to this:

    1
    2
    3
    3a
    3b
    3c
    4
    6
    7
    7b
    7c
    10
    11
    12
    12a
    12b


    That is how I would like them to sort.....but they are coming out all sorts of different way depending on if they are as text, or if I sort "anything that looks like a number as a number". The letters will be sorted in a clump after the numbers, or the single digits will be within the double digits, ie 16,17,18,19,2,20....

    HELP! Thanks in advance for your time.

  2. #2
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sorting numeric and alphanumeric normally

    try assuming your numbers start in a 1 in another column put
    =IF(ISNUMBER(RIGHT(A1)+0),TEXT(A1,"0000"),TEXT(LEFT(A1,LEN(A1)-1),"0000")&RIGHT(A1))
    fill down and sort by that
    "Unless otherwise stated all my comments are directed at OP"

    Mojito connoisseur and now happily retired
    where does code go ?
    look here
    how to insert code

    how to enter array formula

    why use -- in sumproduct
    recommended reading
    wiki Mojito

    how to say no convincingly

    most important thing you need
    Martin Wilson: SPV
    and RSMBC

  3. #3
    Registered User
    Join Date
    12-15-2012
    Location
    RI
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sorting numeric and alphanumeric normally

    Thank you for the reply. It is still not working with that. That seems to make all numbers 4 "spaces" (ie 0000, 0001).

    But, for example, this is still happening:

    0088
    0089
    0001A
    0001B

    I would want the 0001A and 0001B before 0088 and 0089

  4. #4
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Sorting numeric and alphanumeric normally

    Use the formula Martin provided in post #2 then highlight the two column together.

    Right click on the column and go to sort >> custom sort

    Sort by column B >> A to Z

    Next options you see, select >> Sort numbers and numbers stored as text separately.
    HTH
    Regards, Jeff

  5. #5
    Registered User
    Join Date
    12-15-2012
    Location
    RI
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Sorting numeric and alphanumeric normally

    After I highlight both these columns- the original and the one created to insert martins formula- I see no option for custom sort when I right click? When I click the sort tab on the top, there is no option either.

    Sorry if these are really basic excel questions....I turly get by on this for work by pretty much luck . These type of sorting problems have plagued me for years!

  6. #6
    Forum Moderator jeffreybrown's Avatar
    Join Date
    02-19-2009
    Location
    Cibolo, TX
    MS-Off Ver
    Office 365
    Posts
    10,316

    Re: Sorting numeric and alphanumeric normally

    I don't have a good answer for you from here, but hoping others will.

    In the meantime, maybe this will help...

    http://support.microsoft.com/kb/214282

  7. #7
    Forum Expert martindwilson's Avatar
    Join Date
    06-23-2007
    Location
    London,England
    MS-Off Ver
    office 97 ,2007
    Posts
    19,320

    Re: Sorting numeric and alphanumeric normally

    there is no custom sort required just select both columns click data click sort then choose sort by column b

    http://spreadsheets.about.com/od/oth...4_2003sort.htm

+ 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