+ Reply to Thread
Results 1 to 11 of 11

Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

  1. #1
    Registered User
    Join Date
    06-16-2015
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    4

    Question Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

    Wow....to begin with, I'm no where near a guru with Excel...

    Okay, here we go...so I have a lot of rows of data, like nearly 7,000 that I need to sort.

    The way I need to sort it is from left to right. For instance:

    004444-61
    012-06002-301
    012-06004-301
    012-06005
    02010999-202
    02892
    031118-24
    10015767-054
    10560G
    1081-170
    1473342PC79
    149D1100
    1SD10-P-6SM917
    M13516/7−4
    M62217/1−32−2.0
    LC34EN2/D02
    LH89/1

    What I have noticed with the data I need to sort...is that the periods and backslashes only appear when there are strings that start with letters.

    Help on sorting nearly 7k of rows by one column of this mixed data is greatly appreciated.

    Mark

  2. #2
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

    I have some questions, because either this is really easy or I'm missing something (which your data seems to suggest).

    Okay, so you say you are not an Excel guru, so let's start with the 'easy'. Highlight your data, go to the 'Data' ribbon and hit the icon that has an A above a Z with an arrow pointing down (or just hit the Sort icon). That should sort your data.

    Possible complexities -
    You say sort 'left to right'. That is typical sort behavior (at least in the US). Or, do you mean your data is left to right all in one row?

    The data you list is almost sorted. Everything is good until you have the two lines that begin with M above the lines that begin with L. Is that a typo? If not, why?

    You mention periods and backslashes. Okay, what about them? Do you want them removed/ignored? Again, with the list you have above, just using the Sort routine will give you the same results (other than the M and L discrepancy I mentioned above).
    Pauley
    --------
    If I helped with your issue, I'd appreciate a rep bump (hit the '*' icon to the bottom left of this post).

  3. #3
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

    I agree with Pauley. The only problem I see is that you have to have everything in the column stored as text. When you go to sort you will have to tell Excel to sort numbers stored as text separately. Otherwise you will get the ones that Excel thinks are numbers first, and everything else later.
    Some people volunteer in soup kitchens or hospitals. I choose to make the world better by trying to help you with Excel. We're all learning.

    <---Click * Add Reputation for all helpful comments. It's like giving a smile.
    Forum Rules: How to mark your post [Solved] and have a happier, Excel enriched life.

  4. #4
    Registered User
    Join Date
    06-16-2015
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    4

    Re: Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

    Thank you for the response.

    Quote Originally Posted by Pauleyb View Post
    Possible complexities -
    You say sort 'left to right'. That is typical sort behavior (at least in the US). Or, do you mean your data is left to right all in one row?
    The sorting actually needs to be the same as what I listed in my OP.

    The data you list is almost sorted. Everything is good until you have the two lines that begin with M above the lines that begin with L. Is that a typo? If not, why?
    I listed the data as in the way I want it sorted according to a previous submittal, which was accepted.

    You mention periods and backslashes. Okay, what about them? Do you want them removed/ignored? Again, with the list you have above, just using the Sort routine will give you the same results (other than the M and L discrepancy I mentioned above).
    Yes, the periods and backslashes need to be ignored, not removed.

    I used the sort method, but I get the following, which doesn't match what was previously submitted and accepted.

    2892
    004444-61
    012-06002-301
    012-06004-301
    012-06005
    02010999-202
    031118-24
    10015767-054
    10560G
    1081-170
    1473342PC79
    149D1100
    1SD10-P-6SM917
    LC34EN2/D02
    M13516/7−4
    M62217/1−32−2.0

    Again, appreciate all help on this.

    -Mark

  5. #5
    Valued Forum Contributor nigelbloomy's Avatar
    Join Date
    11-06-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    1,011

    Re: Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

    Your value of 02892 is being seen as a number instead of text. You have to start with your original data and format it allas text so that the first "0" isn't removed. Then when you sort it will work.

  6. #6
    Registered User
    Join Date
    06-16-2015
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    4

    Re: Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

    The data would need to flow like this as well when dealing with letters:

    DHOF−3
    DNL0060
    EC18
    F02B125V5A
    FFW100
    FMP32A100E
    L490725−59
    LC34EN2/D02
    LC35GT2

  7. #7
    Forum Expert
    Join Date
    05-30-2012
    Location
    The Netherlands
    MS-Off Ver
    Office 365
    Posts
    14,987

    Re: Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

    officemate,

    show it in a file, and add the expected result also in your file, which you post on the forum.
    Notice my main language is not English.

    I appreciate it, if you reply on my solution.

    If you are satisfied with the solution, please mark the question solved.

    You can add reputation by clicking on the star * add reputation.

  8. #8
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

    I agree with Oeldere. It's not easy to tackle a problem when we don't really know what the expected result is!!
    Glenn




    None of us get paid for helping you... we do this for fun. So DON'T FORGET to say "Thank You" to all who have freely given some of their time to help YOU.

    Temporary addition of accented to illustrate ongoing problem to the TT: L? fh?ile P?draig sona dhaoibh

  9. #9
    Registered User
    Join Date
    06-16-2015
    Location
    USA
    MS-Off Ver
    MS Office 2010
    Posts
    4

    Re: Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

    Quote Originally Posted by oeldere View Post
    officemate,

    show it in a file, and add the expected result also in your file, which you post on the forum.
    I can't figure out how to upload a file here....or it may just be that I don't have access to do that.

  10. #10
    Forum Moderator Glenn Kennedy's Avatar
    Join Date
    07-08-2012
    Location
    Digital Nomad... occasionally based in Ireland.
    MS-Off Ver
    O365 (PC) V 2403
    Posts
    44,055

    Re: Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

    Click on GO ADVANCED and use the paperclip icon to open the upload window.

    View Pic

  11. #11
    Forum Expert
    Join Date
    06-26-2010
    Location
    Austin, TX
    MS-Off Ver
    Excel 2010
    Posts
    1,673

    Re: Sort Mixed Data With Periods, Letters, Numbers, Backslashes and Hyphens

    Quote Originally Posted by officemate View Post
    The sorting actually needs to be the same as what I listed in my OP.
    Okay, then I am missing how the M data appears before the L data. What other non-alphabetic sorting are you expecting (i.e. should the alphabetic chars be sorted Z to A? or is C before B, but K is before L? etc.).

+ 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. vlookup with mixed numbers and letters
    By rolex in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-16-2015, 08:28 AM
  2. How do I sort column with mixed letters and digits?
    By harproblem in forum Excel General
    Replies: 8
    Last Post: 01-16-2015, 06:04 PM
  3. Replies: 1
    Last Post: 08-27-2014, 11:05 AM
  4. Replies: 4
    Last Post: 03-20-2014, 01:39 PM
  5. Sort mixed numbers/letters
    By V-ger in forum Excel General
    Replies: 1
    Last Post: 11-14-2005, 06:55 PM

Tags for this Thread

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