+ Reply to Thread
Results 1 to 8 of 8

Sorting numeric and alphanumeric data

  1. #1
    Registered User
    Join Date
    12-01-2009
    Location
    Hawaii
    MS-Off Ver
    Excel 2010
    Posts
    30

    Sorting numeric and alphanumeric data

    I have a list that contains both numeric and alphanumeric data (see attached file). I want to sort anything that looks like a number as a number. I know i used to be able to do this in Excel 2007, but can't figure out why it doesn't work in the 2010 version.

    Any help would be greatly appreciated.

    Thanks Scott
    Attached Files Attached Files

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting numeric and alphanumeric data

    I've never seen Excel sort the way you describe. For a project like this, I would add a temporary column to assist.

    1) In B2 add the helper formula:

    =LEFT(A2,5)

    2) Copy that cell downward to get a full set of values

    3) Highlight A2:B7

    4) Sort both columns by column B

    5) Delete the helper column formulas.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  3. #3
    Registered User
    Join Date
    12-01-2009
    Location
    Hawaii
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Sorting numeric and alphanumeric data

    There used to be a pop up window or option when you click the Sort button, then you could select to sort anything that looks like a number as a number. But i don't see it in the 2010 version. Maybe they got rid of that option.

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting numeric and alphanumeric data

    7245T as a string was never included in that option. The existence of the "T" made it text.

    The option you're referring to would cause text strings like "7245" to be treated like the number 7245, even though it was a text string. The existence of any actual text characters excluded that string, in my experience.

  5. #5
    Registered User
    Join Date
    12-01-2009
    Location
    Hawaii
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Sorting numeric and alphanumeric data

    I finally figures out where that pop-up window is, and now it works. It was actually the "sort numbers and numbers stored as text separately" option. I hope the boss doesn't find out i spent most of the day trying to sort a spreadsheet. LOL.

    Thanks

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting numeric and alphanumeric data

    Well, now you've got me intrigued. I've hunted and can't find this option, where did you find it?

  7. #7
    Registered User
    Join Date
    12-01-2009
    Location
    Hawaii
    MS-Off Ver
    Excel 2010
    Posts
    30

    Re: Sorting numeric and alphanumeric data

    Click DATA, SORT, then OPTIONS. Check the Case Sensitive option. Then click OK twice. A Sort Warning pop-up window will appear. Select the "sort numbers and numbers stored as text separately" option.


    FYI: a couple of thing you need to do first.
    1. The column should be formatted as TEXT. I don't know if it's necessary, but i think it makes things easier.
    2. If you already have numbers entered, you will need to re-enter them to convert it to actual text. In the formula bar you should see a apostrophe in front of the number (example '12345).


    I attached a condensed sample spreadsheet so you could see the actual entries. Since all the data in column A is actually text, it sorts exactly like how i wanted.
    Attached Files Attached Files

  8. #8
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Sorting numeric and alphanumeric data

    Thanks, learned somthing new today!

+ 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