+ Reply to Thread
Results 1 to 3 of 3

Sorting first column not working, sorting column 2 and 3 does (same code)

  1. #1
    Forum Contributor
    Join Date
    11-23-2015
    Location
    Yada, Wales
    MS-Off Ver
    Office 2013
    Posts
    176

    Sorting first column not working, sorting column 2 and 3 does (same code)

    Below is three macros, sorting column 1, 2 and 3.
    The interval is defined by the strings StartRow and EndRow that are hidden in the sheet.

    When running macro SortColumn2 and SortColumn3 sorting works fine.
    But when running SortColumn1 it messes up and Endrow unhides, moving to the top before StartRow.

    What is wrong with SortColumn1?


    Please Login or Register  to view this content.
    Attached Files Attached Files
    Last edited by jokris; 04-13-2016 at 03:08 AM.

  2. #2
    Forum Guru Kaper's Avatar
    Join Date
    12-14-2013
    Location
    Warsaw, Poland
    MS-Off Ver
    most often: Office 365 in Windows environment
    Posts
    8,613

    Re: Sorting first column not working, sorting column 2 and 3 does (same code)

    Working code:
    Please Login or Register  to view this content.
    the problem was because "EndRow" is in column A, and your addresses were wrong
    see what goes on with your version displaying debugging info
    Please Login or Register  to view this content.
    Best Regards,

    Kaper

  3. #3
    Forum Contributor
    Join Date
    11-23-2015
    Location
    Yada, Wales
    MS-Off Ver
    Office 2013
    Posts
    176

    Re: Sorting first column not working, sorting column 2 and 3 does (same code)

    Thanks for quick help on this one!

+ 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. Replies: 12
    Last Post: 01-28-2014, 12:36 PM
  2. Sorting 2 data ranges by comparing one column in each and sorting to match
    By MDKsmiffy in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 06-17-2013, 03:30 PM
  3. Sorting a range to invert it upside down without sorting by any specific column
    By luv2glyd in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 03-29-2013, 12:53 PM
  4. [SOLVED] Sorting a range to invert it upside down without sorting by any specific column
    By luv2glyd in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 03-28-2013, 12:43 PM
  5. Replies: 11
    Last Post: 02-11-2013, 08:10 AM
  6. Replies: 4
    Last Post: 08-25-2012, 07:49 AM
  7. Replies: 7
    Last Post: 04-20-2010, 04:28 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