+ Reply to Thread
Results 1 to 4 of 4

Sort by number not by letter (C1, A2, B3, D4)

  1. #1
    Registered User
    Join Date
    05-04-2006
    Posts
    2

    Sort by number not by letter (C1, A2, B3, D4)

    I have numbers with a letter in front. I want to sort them by the number and ignore the letter. The only way Excel does it is by the letter (unless I'm missing something). Here is an example of my list:

    A541
    A586
    A600
    A618
    A660
    B299
    B327
    B416
    B421
    B501
    B547
    B567
    L917
    M125
    N207
    P196
    PI93
    T279
    T284
    T312
    V180
    V324
    X327
    X341
    Z315
    Z318
    Z340
    Z372

    As you can see, it sorts it by the letter first, then number. I want it to sort by the number first, then the letter. Does anyone know how I can do this? Thanks!

  2. #2
    Jim Cone
    Guest

    Re: Sort by number not by letter (C1, A2, B3, D4)

    One of your entries has two leading alphas.
    That complicates things. With only one leading alpha, you can
    enter the following formula in an adjoining column, fill down and
    then sort both columns using the new column as the sort column.
    Then clear the new column... =RIGHT(B5,LEN(B5)-1)
    --
    Jim Cone
    San Francisco, USA
    http://www.officeletter.com/blink/specialsort.html


    "dukemeiser"
    wrote in message
    I have numbers with a letter in front. I want to sort them by the
    number and ignore the letter. The only way Excel does it is by the
    letter (unless I'm missing something). Here is an example of my list:

    A541
    A586
    A600
    A618
    A660
    B299
    B327
    B416
    B421
    B501
    B547
    B567
    L917
    M125
    N207
    P196
    PI93
    T279
    T284
    T312
    V180
    V324
    X327
    X341
    Z315
    Z318
    Z340
    Z372

    As you can see, it sorts it by the letter first, then number. I want
    it to sort by the number first, then the letter. Does anyone know how
    I can do this? Thanks!
    --
    dukemeiser


  3. #3
    Registered User
    Join Date
    05-04-2006
    Posts
    2
    It worked on the set that I had posted, but to make things more complicated, I have this too:

    A2
    F8
    Z22
    P28
    Z33
    T39
    X54
    S55
    X69
    S75
    S106
    M125
    R159
    T170
    X171
    Z172
    A179
    V180
    V193

    These are obviously sorted, but Excel doesn't treat them in order. It sorts them 106, 125, ..., 2, 22, 28... I know that if I type them 002 and 022 it will sort correctly, but I can't have it printed that way.
    Last edited by dukemeiser; 05-04-2006 at 09:23 PM.

  4. #4
    Jim Cone
    Guest

    Re: Sort by number not by letter (C1, A2, B3, D4)

    I'm glad as the formula to handle 1 or 2 leading characters is six times longer.
    Jim Cone
    San Francisco, USA
    http://www.realezsites.com/bus/primitivesoftware



    "dukemeiser"
    wrote in message
    Hey, it worked! Thanks a million!
    --
    dukemeiser


+ 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