+ Reply to Thread
Results 1 to 6 of 6

Excel to sort complex numbers in correct order

  1. #1
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Excel to sort complex numbers in correct order

    Good Morning All,

    I was wondering if there was a way to get excel to sort complex numbers correctly.

    When sorting numbers like this volume 4 should be after volume 3 but ends up coming after volume 39.

    LNBV-97-1135 vol. 4
    LNBV-97-1135 vol. 40

    Anyone know a way to get excel to sort numbers like this? I have a sheet with over 60,000 entries on it like this and sorting it is becoming a real pain.

    Thanks in advance for any help

  2. #2
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Excel to sort complex numbers in correct order

    are they all the same format? ie are all of the 60,000 entries in the format of 18 chars before the volume number?


    if so then in a free column (Ill assume B and your number is in A) put

    Please Login or Register  to view this content.
    this will make the numbers of 0-9 become 2 digits and therefore sortable.

    ie LNBV-97-1135 vol. 4 will become LNBV-97-1135 vol. 04

    Drop the formula down, copy the column then paste special Values over the original column.
    If someone has helped you then please add to their Reputation

  3. #3
    Forum Expert
    Join Date
    03-23-2004
    Location
    London, England
    MS-Off Ver
    Excel 2019
    Posts
    7,064

    Re: Excel to sort complex numbers in correct order

    Create a new column with this formula
    =MID(A1,FIND("vol.",A1)+4,LEN(A1)-FIND("vol.",A1)+4)+0
    and sort on that column
    Regards
    Special-K

    Ensure you describe your problem clearly, I have little time available to solve these problems and do not appreciate numerous changes to them.

  4. #4
    Valued Forum Contributor Blake 7's Avatar
    Join Date
    10-01-2010
    Location
    Bogota, Colombia
    MS-Off Ver
    Excel 2010 64 bit and Excel 2007,
    Posts
    1,377

    Re: Excel to sort complex numbers in correct order

    You could always create a new column and use this formula to extract all numbers after to . then sort on that column

    Please Login or Register  to view this content.
    Oh gosh, I must be a slow typer!
    Blake 7

    If your question has been answered, please click EDIT in your original post, click GO ADVANCED and set the PREFIX box to SOLVED.

    If any member's response has helped to solve your problem, please consider using the scales icon on the top right of their post to show your appreciation.

    http://failblog.org/

  5. #5
    Forum Contributor
    Join Date
    01-21-2013
    Location
    Aberdeen, Scotland
    MS-Off Ver
    Excel 2007
    Posts
    258

    Re: Excel to sort complex numbers in correct order

    Wow, Cheers to all of you guys! an incredible response in such a short time. Rep for all!

  6. #6
    Forum Expert
    Join Date
    10-09-2014
    Location
    Newcastle, England
    MS-Off Ver
    2003 & 2013
    Posts
    1,986

    Re: Excel to sort complex numbers in correct order

    Quote Originally Posted by Special-K View Post
    Create a new column with this formula
    =MID(A1,FIND("vol.",A1)+4,LEN(A1)-FIND("vol.",A1)+4)+0
    and sort on that column
    Quote Originally Posted by Blake 7 View Post
    You could always create a new column and use this formula to extract all numbers after to . then sort on that column

    Please Login or Register  to view this content.
    Oh gosh, I must be a slow typer!
    if you sort just on the numbers though you'll get totally different answers eg

    LNBV-97-1136 vol. 4 will be before LNBV-97-1135 vol. 5

+ 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 get the correct sort order
    By sumesh56 in forum Excel General
    Replies: 15
    Last Post: 10-30-2014, 10:58 AM
  2. How can I data sort more than 1 row of numbers numerical order
    By Larbec in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 08-13-2013, 12:46 AM
  3. Sort the numbers in ascending order by lines
    By marreco in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 03-15-2012, 04:54 PM
  4. Update numbers/cell format to correct sort issue
    By maacmaac in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-03-2012, 12:50 PM
  5. How do I sort numbers from left to right and down in order.
    By Robert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-14-2006, 10:20 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