+ Reply to Thread
Results 1 to 3 of 3

Auto sort by date in Excel 2007

  1. #1
    Registered User
    Join Date
    02-12-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    2

    Auto sort by date in Excel 2007

    Hello! This is my first post on the forum so hopefully somebody can help me out I'm working with an Excel 2007 spreadsheet and am trying to find out if I can autosort it by date when I enter in a new value (date). I am using columns A through J with the date in column I. I am also using row 11 as the header column (company name, phone, email, etc.) and rows 12 and beyond for the actual values. I would like to autosort the spreadsheet by date (from the earliest date to the furthest out) everytime I enter a new one in. Is this possible? Also, I would prefer this to happen as soon as I enter the date, not just when I reopen the spreadsheet. Thanks in advance!!!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Auto sort by date in Excel 2007

    Hi,

    You'll need a macro to sort it automatically every time you enter a new date. First ensure that all the data in A11:Jnn (where nn is the last row) is in an Excel Table named 'Table1' - alter this name in the macro below if appropriate.

    Then in the Sheet_Change event add the following macro

    Please Login or Register  to view this content.
    To get to the sheet change event go to the Visual Basic Environment (VBE) with ALT-F11, then find the sheet name you're interested in in the Project Explorer window on the left and double click it. In the right hand window click the left had drop down and pick 'Worksheet'. In the right hand drop down pick the 'Sheet_Change' event.

    HTH
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    02-12-2010
    Location
    Phoenix, AZ
    MS-Off Ver
    Excel 2007
    Posts
    2

    Re: Auto sort by date in Excel 2007

    Worked perfectly, you're the man!

+ 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