Share via

Sorting by date automatically

Anonymous
2016-08-29T17:48:21+00:00

Hello, I am new to Macros and unfamiliar with certain functions.

I have a list of names (Column A), and a list of dates (Column C) associated with those names in a separate column, same row.

There is also 4 rows of headers before beginning the data.

I change the dates that are associated with those names and sort them from Oldest to newest.

I would like my changes to be reflected automatically and sorted every time I enter in new data.

I have no idea how to use a macro to accomplish this.

Thank You

Microsoft 365 and Office | Excel | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

4 answers

Sort by: Most helpful
  1. Anonymous
    2016-08-29T18:39:17+00:00

    I do not recommend auto-sorting.

    No offense, but I'm not looking for a recommendation. Just a code

    Was this answer helpful?

    1 person found this answer helpful.
    0 comments No comments
  2. Anonymous
    2016-08-29T19:27:56+00:00

    No offense taken.

    Gord

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2016-08-29T18:40:01+00:00

    Figured it Out

    Private Sub Worksheet_Change(ByVal Target As Range)

        On Error Resume Next

        Range("C4").Sort Key1:=Range("C467"), _

          Order1:=xlAscending, Header:=xlYes, _

          OrderCustom:=1, MatchCase:=False, _

          Orientation:=xlTopToBottom

    End Sub

    Was this answer helpful?

    0 comments No comments
  4. Anonymous
    2016-08-29T18:32:54+00:00

    Automatically would mean VBA.

    I do not recommend auto-sorting.

    If an incorrect entry is made it will be hard to find after an autosort sort has taken place.

    Enter your data, check it twice then do your sort using Data>Sort

    Gord

    Was this answer helpful?

    0 comments No comments