+ Reply to Thread
Results 1 to 9 of 9

Correctly sorting an alpha-numeric number when not all numbers have 3 digits.

  1. #1
    Registered User
    Join Date
    11-07-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    8

    Correctly sorting an alpha-numeric number when not all numbers have 3 digits.

    I feel like this is far beneath me, but here goes. I'm no wizard, but this is really frustrating me.

    I have a column of alpha-numeric numbers - like so:

    E109
    E11
    E11
    E110
    E119
    E12
    E12
    E120
    E120
    E121
    E121
    M137
    M138
    M139
    M139
    M14
    M140

    I am trying to sort them like this:

    E11
    E11
    E12
    E12
    E109
    E110
    E119
    E120
    E120
    E121
    E121
    M14
    M137
    M138
    M138
    M139
    M139
    M140
    M141
    M142

    I know it sorts right to left when a numeric value, and I don't know how to do it the other way.

    I have tried formatting the numbers as a custom format "000" I have tried changing the format to numbers, text, etc..... I have also tried text to columns, then making the numbers 3 digits, then pasting the values, and combining them. I've finally tried =TEXT(a1,"xxxx")

    Can anyone please help me with this situation? I am sure it's something super easy, or there is a way to split the column and format, etc.

    Thank you,

    Christianpax_mfst_all.xlsx

  2. #2
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Correctly sorting an alpha-numeric number when not all numbers have 3 digits.

    One way to create two helper columns F and G and custom sort first on F and second on G.
    See the attachment.
    Attached Files Attached Files
    Regards
    sktneer


    Treat people the way you want to be treated. Talk to people the way you want to be talked to.
    Respect is earned NOT given.

  3. #3
    Registered User
    Join Date
    11-07-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Correctly sorting an alpha-numeric number when not all numbers have 3 digits.

    I'm going to try to figure out exactly what you did there, but thank you my friend. You are a saint!!!!!!!!!!!!!

  4. #4
    Registered User
    Join Date
    11-07-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Correctly sorting an alpha-numeric number when not all numbers have 3 digits.

    After you put the helper columns in, which column do you click on to sort a-z?

    I tried a few different columns, and every time it sent me back to the old results.

    Thanks!

    Christian

  5. #5
    Registered User
    Join Date
    11-07-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Correctly sorting an alpha-numeric number when not all numbers have 3 digits.

    Nevermind. It's column F correct. Man I'm feeling extra green today

  6. #6
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Correctly sorting an alpha-numeric number when not all numbers have 3 digits.

    Glad to help you. If you are satisfied with the solution provided, please mark this thread as solved. Moreover you may click * (star) to Add Reputation also.

  7. #7
    Registered User
    Join Date
    11-07-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Correctly sorting an alpha-numeric number when not all numbers have 3 digits.

    Hey Sktneer,

    When I got home from work, I went back in to fiddle around a little more, and when I tried to recreate the intended results I couldn't get it to work anymore? Also, when I fiddled around with the one you uploaded, I also found out that it was making mistakes. Is there something I am missing?

    Thanks!


    pax_mfst_all my attempt.xlsx

  8. #8
    Registered User
    Join Date
    11-07-2013
    Location
    Los Angeles
    MS-Off Ver
    Excel 2007
    Posts
    8

    Re: Correctly sorting an alpha-numeric number when not all numbers have 3 digits.

    Ha! Nevermind, I got it! I've never used the custom sort function! Thanks for dealing with me! ha! So excited!!!

  9. #9
    Forum Guru sktneer's Avatar
    Join Date
    04-30-2011
    Location
    Kanpur, India
    MS-Off Ver
    Office 365
    Posts
    9,649

    Re: Correctly sorting an alpha-numeric number when not all numbers have 3 digits.

    Thanks for the complement and the rep.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. Replies: 11
    Last Post: 11-16-2011, 12:56 PM
  2. sorting alpha and numeric
    By ekaramol in forum Excel General
    Replies: 1
    Last Post: 09-05-2008, 11:19 AM
  3. Sorting alpha-numeric barcodes
    By Ophiuroid in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 01-21-2008, 04:48 PM
  4. [SOLVED] Sorting Alpha Numeric
    By CS Project Man in forum Excel General
    Replies: 2
    Last Post: 12-21-2005, 01:00 PM
  5. Alpha-Numeric Sorting
    By Jose in forum Excel General
    Replies: 5
    Last Post: 12-05-2005, 05:55 PM

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