+ Reply to Thread
Results 1 to 6 of 6

Sort Excel Numbers Containing Assorted Numbers and Characters

  1. #1
    Registered User
    Join Date
    11-20-2016
    Location
    Maine
    MS-Off Ver
    Office 365
    Posts
    3

    Question Sort Excel Numbers Containing Assorted Numbers and Characters

    I have a spreadsheet with a column that has numbers that may/may not contain text and characters such as ( ). For example:

    120.04-A
    120.45(A)1
    120.50(3)
    120.55
    125.21
    135.36
    130.65
    130.65-a

    When I sort the list, the numbers are at the top and those w/ text and/or special characters are at the end. How do I order the list using the first 5 numbers (###.##) and any subsequent text/characters? Thank you!

  2. #2
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Sort Excel Numbers Containing Assorted Numbers and Characters

    Welcome to the board.

    Select the data, format as Text, and then do Data > Text to columns, Finish.

    Then sort.
    Entia non sunt multiplicanda sine necessitate

  3. #3
    Registered User
    Join Date
    11-20-2016
    Location
    Maine
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Sort Excel Numbers Containing Assorted Numbers and Characters

    shg - thank you for the welcome and prompt reply. When I converted the numbers to text, I lost the number going to two places, e.g., 120.60 became 120.6. I manually added a '0' and then sorted. The data did not sort as desired, and the numbers I added the '0' to were now put with the others that are not just a number at the bottom of the list. Another sample list of what I am trying to sort:

    115.00
    115.01
    115.05
    115.08
    120.03
    120.04
    120.00(A)(1)
    120.00(A)(2)
    120.00(A)(3)
    130.60
    130.65
    260.10
    263.05
    135.37
    130.65-a
    230.08

    These numbers are not properly sorted. I would like the 130.65-a to follow the 130.65.

    Again, thanks for any assistance you provide.

  4. #4
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Sort Excel Numbers Containing Assorted Numbers and Characters

    I pre-formatted a column to text, copied your data from post #3, and pasted as values. Here's how it sorted:

    115.00
    115.01
    115.05
    115.08
    120.00(A)(1)
    120.00(A)(2)
    120.00(A)(3)
    120.03
    120.04
    130.60
    130.65
    130.65-a
    135.37
    230.08
    260.10
    263.05

  5. #5
    Forum Expert shg's Avatar
    Join Date
    06-20-2007
    Location
    The Great State of Texas
    MS-Off Ver
    2010, 2019
    Posts
    40,689

    Re: Sort Excel Numbers Containing Assorted Numbers and Characters

    Just to fill in some blanks:

    1. Formatting numbers as Text doesn't make them text, though they do align left like text. You need to do something to convert them, and that's what text to columns does.

    2. If the data is manually entered, the columns should be formatted as Text beforehand. If it's imported, it should be imported as Text.

  6. #6
    Registered User
    Join Date
    11-20-2016
    Location
    Maine
    MS-Off Ver
    Office 365
    Posts
    3

    Re: Sort Excel Numbers Containing Assorted Numbers and Characters

    she - thanks. Yours sorted perfectly. However, for me it is still not working. I inserted a column and formatted it as text. Then copied the numbers from the original column and pasted as values. I then sorted by the new column. The numbers with a letter, hyphen, and/or parenthesis still did not sort like you were able to. I will give it another try in the morning.

+ 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. [SOLVED] How to remove spaces between characters and numbers within cells in Excel?
    By Edgars.Aronietis in forum Excel General
    Replies: 8
    Last Post: 08-26-2015, 07:42 AM
  2. VBA to set accepted inputs to specific cell, allow numbers and characters in excel
    By Raf_sia in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 07-23-2015, 08:19 AM
  3. [SOLVED] How do you sort item numbers targeting only specific numbers?
    By matt323 in forum Excel General
    Replies: 10
    Last Post: 12-29-2013, 01:15 AM
  4. Replies: 1
    Last Post: 12-28-2013, 11:46 PM
  5. [SOLVED] How to merge a numbers from 3 cells, eliminate repetitive numbers, and sort such numbers?
    By david gonzalez in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 10-22-2012, 11:59 AM
  6. Replies: 7
    Last Post: 04-24-2008, 04:56 PM
  7. [SOLVED] I want to sort, ignoring all characters except numbers
    By wojo in forum Excel General
    Replies: 15
    Last Post: 07-08-2005, 05:05 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