+ Reply to Thread
Results 1 to 3 of 3

Trouble with sort code in macro

  1. #1
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Trouble with sort code in macro

    I have a sort function in one of my macro. Sometimes it works, sometimes it does not. I can't figure out why. I am trying to sort columns A-F and each column has a header.

    Please Login or Register  to view this content.
    I am thinking it is because of
    Please Login or Register  to view this content.
    but I may be wrong. Any thoughts as to why it keeps blowing up? Thanks.
    Last edited by maacmaac; 02-03-2009 at 04:08 PM.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258

    Re: Trouble with sort code in macro

    Hello maacmaac,

    Since you do have headers, change the header argument to yes and the Orientation.
    Please Login or Register  to view this content.
    Last edited by Leith Ross; 02-03-2009 at 03:01 PM.
    Sincerely,
    Leith Ross

    Remember To Do the Following....

    1. Use code tags. Place [CODE] before the first line of code and [/CODE] after the last line of code.
    2. Thank those who have helped you by clicking the Star below the post.
    3. Please mark your post [SOLVED] if it has been answered satisfactorily.


    Old Scottish Proverb...
    Luathaid gu deanamh maille! (Rushing causes delays!)

  3. #3
    Valued Forum Contributor
    Join Date
    11-20-2003
    MS-Off Ver
    2010, 2016
    Posts
    1,173

    Re: Trouble with sort code in macro

    Leith,

    Your solution worked except for change the Orientation to SortRows. I'm not sure why I would use SortRows in the Orientation. When I execute the code this way it is doing the sort left to right, not top to bottom. I had to revert back to TopToBottom for the Orientation. Otherwise I am marking as solved. Code is now as follows:
    Please Login or Register  to view this content.
    Thank you for the comment.

+ 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