Results 1 to 7 of 7

Thread: Macro To Sort Data Ascending and Decending Using VBA

Hybrid View

Previous Post Previous Post   Next Post Next Post
  1. #1
    Junior Member
    Join Date
    Feb 2013
    Posts
    26
    Rep Power
    0
    Ok, since I'm new to this... A few questions...
    The 'macro' is called ExcelFox, right?...
    It's a module? Right? So Ican hit Alt-F11, paste this code into a Module, right?
    Then I can run it immediately or I can call it by going to 'Developer' then 'Macros', then running it, right?
    Once I run it, that's it! Right?...

    Sorry for all the 'Rights'!

    I'll try it when I get home tonight!
    Last edited by Excel Fox; 05-10-2013 at 12:25 AM. Reason: Quote Removed

  2. #2
    Junior Member
    Join Date
    Feb 2013
    Posts
    26
    Rep Power
    0
    Quote Originally Posted by olives View Post
    ... I'll try it when I get home tonight!
    Just tried it out, Fox! It looks good! Thanks!

    Let me ask you this... It doesn't seem to be incluidng the top row, row 1, in the sort, what do I have to change in the code to include the top row?...

    Does it have to do with this row?:

    Code:
    lng = Application.Max(.Cells(.Rows.Count, "J").End(xlUp).Row, 2)
    Is the 2 at the end what I should change to 1? Thanks!

Similar Threads

  1. Sort Data Using Formula To Find Top X
    By mahmoud-lee in forum Excel Help
    Replies: 12
    Last Post: 06-02-2013, 10:13 PM
  2. Sort data sheet by right_click of mouse
    By Rasm in forum Excel and VBA Tips and Tricks
    Replies: 3
    Last Post: 12-08-2012, 07:34 PM
  3. Excel Macro to Sort Data if a value changes in defined range
    By Rajesh Kr Joshi in forum Excel Help
    Replies: 4
    Last Post: 09-05-2012, 10:31 AM
  4. Sort Data When a Header Is Clicked
    By Rasm in forum Excel Help
    Replies: 9
    Last Post: 08-01-2012, 06:46 AM
  5. Sort Worksheet by Color VBA
    By Admin in forum Excel and VBA Tips and Tricks
    Replies: 0
    Last Post: 10-25-2011, 02:25 AM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •