+ Reply to Thread
Results 1 to 6 of 6

Sort with comma delimited numbers

  1. #1
    Forum Contributor
    Join Date
    08-18-2009
    Location
    Chih, Mexico
    MS-Off Ver
    Excel 2010
    Posts
    102

    Post Sort with comma delimited numbers

    Hi,

    Need your help to make a macro wich it's going to sort comma delimited number in the correct order..
    see attached file to get the wanted reult..

    Thanks in advance...
    Attached Files Attached Files

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,917

    Re: Sort with comma delimited numbers

    I have no idea how to answer this, but looking at your data, I have to ask...

    from this...
    ,10,11,12,13
    how on earth do you get this???
    ,2,3,4
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Sort with comma delimited numbers

    I think that what the OP wants is not to sort the numbers in the string, but to sort the strings according to the first number in the string.

    Using Excel's sorting ",11,12,13" < ",2,3,4" which the OP doesn't want.

    I think this will do it. If there is a bunch of data, this bubble sort will be slow and if the data is fouled, the LT function will have to clean it up.

    Please Login or Register  to view this content.
    _
    ...How to Cross-post politely...
    ..Wrap code by selecting the code and clicking the # or read this. Thank you.

  4. #4
    Forum Contributor
    Join Date
    08-18-2009
    Location
    Chih, Mexico
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Sort with comma delimited numbers

    Hello,

    Mike
    thanks for your code, it does work but it's there a way to move the entire row as the numbers get in the correct order..

  5. #5
    Forum Expert mikerickson's Avatar
    Join Date
    03-30-2007
    Location
    Davis CA
    MS-Off Ver
    Excel 2011
    Posts
    6,229

    Re: Sort with comma delimited numbers

    Perhaps
    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    08-18-2009
    Location
    Chih, Mexico
    MS-Off Ver
    Excel 2010
    Posts
    102

    Re: Sort with comma delimited numbers

    Mike,

    Thanks for your help!!

    It works perfect...

+ 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. Splitting comma delimited numbers into new columns
    By salmansohail in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 05-30-2010, 07:00 PM
  2. Splitting comma delimited numbers into new columns
    By Cicada in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 04-23-2009, 07:30 PM
  3. Adding comma delimited numbers in a cell
    By Cicada in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 04-20-2009, 01:23 PM
  4. [SOLVED] Converting negative/positive numbers to a CSV (Comma-delimited .TX
    By Simon Letten in forum Excel Formulas & Functions
    Replies: 6
    Last Post: 09-06-2005, 09:05 AM
  5. Converting negative/positive numbers to a CSV (Comma-delimited .TX
    By Simon Letten in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-06-2005, 06:05 AM

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