+ Reply to Thread
Results 1 to 4 of 4

Ascending with macro make wrong result.

  1. #1
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Ascending with macro make wrong result.

    Hi I have this macro a part of a bigger step by step macro.

    It make error. It have top sort ascending in column D after numbers.

    But it include the text after.

    This is the way i can export the file. And also the customername after the number is important to still have when it sort.

    But the sort in this column D shall only depend of the numbers not the text after.

    Can the code be changed so it only sort after the numbers? But still include the text in same column after the sort.?

    The name can be long i have changed it here to not public confidental info.

    Please have a look in the sample file.

    There is a button in Sheet1 and when you press it shall sort in sheet2 column D


    Code in the file is:

    Please Login or Register  to view this content.
    Thanks in advance

    Abjac
    Attached Files Attached Files

  2. #2
    Forum Guru
    Join Date
    07-25-2011
    Location
    Florida
    MS-Off Ver
    Excel 2003
    Posts
    9,077

    Re: Ascending with macro make wrong result.

    This code first splits the Text from column D in column M then sorts on column M. Then clears column M.

    Please Login or Register  to view this content.
    Last edited by AlphaFrog; 12-05-2012 at 11:47 AM.

  3. #3
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Ascending with macro make wrong result.

    Hi AlphaFrog and thanks for your answer. I tried it and it seems to be ok. But i need to check it tomorrow in a much bigger file. And check if all columns are sorted correct, with amounts etc. I will return back for sure and say if its working or not.

    I tried to split the code up, and i was surprised that it copy the text to column M and not cut it. I dont know if it means anything
    But in my mind thought it should cut it to column M and then copy it back to column D.

    But maybe its fine. I will let you know

    Thanks for now

    Abjac

  4. #4
    Forum Contributor
    Join Date
    07-28-2012
    Location
    madrid
    MS-Off Ver
    Excel 2010 at work excel 2016
    Posts
    1,050

    Re: Ascending with macro make wrong result.

    Hi Alphafrog I have now checked the big file and so far no errors found. So it seems its working. Thanks alot for you help it really help alot. Thanks

    Abjac

+ 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