+ Reply to Thread
Results 1 to 7 of 7

How to automatically sort all rows under row 1 according to column A (which has dates)

  1. #1
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    298

    How to automatically sort all rows under row 1 according to column A (which has dates)

    What script would I use to sort the entire worksheet for row 2 to the last used row, by column A, which has dates?

    I want it sorted so that the oldest dates are first.

    Thanks!

  2. #2
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,844

    Re: How to automatically sort all rows under row 1 according to column A (which has dates)

    Have you tried recording a macro for this action?
    You can say "THANK YOU" for help received by clicking the Star symbol at the bottom left of the helper's post.
    Practice makes perfect. I'm very far from perfect so I'm still practising.

  3. #3
    Forum Contributor
    Join Date
    09-04-2013
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    298

    Re: How to automatically sort all rows under row 1 according to column A (which has dates)

    No as I did not know hot to tell the macro to always go to the last row, it does not seem to be a recordable task.

  4. #4
    Forum Expert Mumps1's Avatar
    Join Date
    10-10-2012
    Location
    Toronto, Canada
    MS-Off Ver
    Excel 2010, 2013
    Posts
    7,844

    Re: How to automatically sort all rows under row 1 according to column A (which has dates)

    Try:
    Please Login or Register  to view this content.
    Note the variable for the last row.

  5. #5
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How to automatically sort all rows under row 1 according to column A (which has dates)

    Maybe:

    Please Login or Register  to view this content.

  6. #6
    Forum Contributor
    Join Date
    02-13-2014
    Location
    India
    MS-Off Ver
    Excel 2013
    Posts
    140

    Re: How to automatically sort all rows under row 1 according to column A (which has dates)

    John, Wow...
    What a simple code.

    can you please suggest a code to sort entire sheet with 2 columns.

    instead of only range a2 i need to sort first G2 and E2 at the same time. please

  7. #7
    Forum Expert
    Join Date
    06-12-2012
    Location
    Ridgefield Park, New Jersey
    MS-Off Ver
    Excel 2003,2007,2010
    Posts
    10,241

    Re: How to automatically sort all rows under row 1 according to column A (which has dates)

    @ winmaxservices - I would be glad to help out. However you should start another thread. See rule No. 2 in the link below.

    http://www.excelforum.com/forum-rule...rum-rules.html

+ 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. [SOLVED] Automatically Sort Due Dates as They Change
    By LilyRB in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 08-15-2014, 07:45 PM
  2. [SOLVED] I have a sort macro. How to add script to preselect rows to sort based on column value?
    By Jasonhouse in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 03-09-2014, 02:25 AM
  3. Sort All other dates and data column according to Column A Dates
    By farrukh in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 02-04-2012, 01:46 PM
  4. Formula to sort rows automatically
    By jamesjhhill in forum Excel General
    Replies: 4
    Last Post: 01-28-2011, 04:28 AM
  5. Sort Rows Automatically
    By aegliveinterns in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 10-14-2010, 02:52 PM
  6. Need help for macro to automatically sort every 5 rows
    By excelbeginner in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-25-2008, 03:27 PM
  7. Replies: 1
    Last Post: 06-22-2005, 10:05 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