+ Reply to Thread
Results 1 to 4 of 4

Sort variable range in VBA

  1. #1
    Registered User
    Join Date
    11-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    69

    Sort variable range in VBA

    Good afternoon,

    I have attached a spreadsheet that has data in it and I wrote a macro to sort it but it is not working. Any ideas?
    Attached Files Attached Files

  2. #2
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Sort variable range in VBA

    Please Login or Register  to view this content.


    If your problem is solved, then please mark the thread as SOLVED>>Above your first post>>Thread Tools>>
    Mark your thread as Solved


    If the suggestion helps you, then Click *below to Add Reputation

  3. #3
    Registered User
    Join Date
    11-17-2010
    Location
    Australia
    MS-Off Ver
    Excel 2007
    Posts
    69

    Re: Sort variable range in VBA

    Thank you so much for that sixth Sense, actually, you have helped me before quite a few times actually so I am eternally grateful, can you just tell me exactly what was wrong with my code? Will post positive feedback for you.

  4. #4
    Forum Guru :) Sixthsense :)'s Avatar
    Join Date
    01-01-2012
    Location
    India>Tamilnadu>Chennai
    MS-Off Ver
    2003 To 2010
    Posts
    12,770

    Re: Sort variable range in VBA

    In this line you asked excel to set the data range without headers.

    Please Login or Register  to view this content.
    But after that you given Yes to header part in code

    Please Login or Register  to view this content.
    I just changed the code to cover the header part.

    Please Login or Register  to view this content.

+ 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. VBA Variable Range Sort
    By Alyena in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 04-13-2013, 04:26 AM
  2. How to set global variable to certain range and use it to sort columns
    By rain4u in forum Excel Programming / VBA / Macros
    Replies: 8
    Last Post: 10-09-2011, 09:40 AM
  3. Sort Dynamic Variable Range
    By GetSet in forum Excel Programming / VBA / Macros
    Replies: 7
    Last Post: 09-24-2010, 08:42 AM
  4. Sort a range using a variable
    By iAlex in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-13-2009, 05:34 AM
  5. Data Sort for variable range
    By harleypop in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 04-06-2009, 05:26 PM
  6. Sort variable range via macro
    By nigelog in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-30-2008, 05:30 AM
  7. Sort using a variable for range
    By Davew01 in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 11-02-2006, 08:03 PM
  8. Set variable sort range based on found text
    By jeffbert in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-20-2006, 05:20 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