+ Reply to Thread
Results 1 to 6 of 6

Excel '07 macro breaks in '03: Multiple levels of sorting

  1. #1
    Registered User
    Join Date
    06-13-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2003
    Posts
    3

    Excel '07 macro breaks in '03: Multiple levels of sorting

    Hello All,

    I'm writing because I have a worksheet and macro that I use on a machine with Excel '07. I've been able to build all of the logic of the macro I inherited to be compatible with Excel 2003 except for this issue with multiple levels of sorting. The code that breaks in Excel 2003 is below... I get a runtime error that "object doesn't support this property or method)...any workarounds? They don't have to be pretty. This workbook is being used by 8 people who all work in the same room.

    Please Login or Register  to view this content.
    Last edited by dinerroll; 06-13-2011 at 12:09 PM.

  2. #2
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064

    Re: Excel '07 macro breaks in '03: Multiple levels of sorting

    The Sort object was added in 2007. You'll need to use the Range.Sort method and do three sorts - first on O, R and S; then on H, E and J; and lastly on A, B and D.
    Everyone who confuses correlation and causation ends up dead.

  3. #3
    Registered User
    Join Date
    06-13-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Excel '07 macro breaks in '03: Multiple levels of sorting

    Hey romperstomper. Thanks for the quick reply. I used to just used SQL to do most of my data analysis, so I really don't have any VBA experience. Can you give just a quick example of what the code for that would look like for one of the sorts?

  4. #4
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064

    Re: Excel '07 macro breaks in '03: Multiple levels of sorting

    For example:
    Please Login or Register  to view this content.

  5. #5
    Registered User
    Join Date
    06-13-2011
    Location
    New York, NY
    MS-Off Ver
    Excel 2003
    Posts
    3

    Re: Excel '07 macro breaks in '03: Multiple levels of sorting

    Thank you so much dude. I came up with

    Please Login or Register  to view this content.
    But your solution looks way better. Thank you so much for the original suggestion and this code.

  6. #6
    Forum Expert romperstomper's Avatar
    Join Date
    08-13-2008
    Location
    England
    MS-Off Ver
    365, varying versions/builds
    Posts
    22,064

    Re: Excel '07 macro breaks in '03: Multiple levels of sorting

    Glad to help.

    If you are satisfied with the solution(s) provided, please mark your thread as Solved.

    How to mark a thread Solved
    Go to the first post
    Click edit
    Click Go Advanced
    Just below the word Title you will see a dropdown with the word No prefix.
    Change to Solved
    Click Save

+ 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