1
Is there a way to sort rows in Excel 2013 based on when the rows were added?
1
Is there a way to sort rows in Excel 2013 based on when the rows were added?
2
Sure, just assign one of the columns in your data to the date. When you enter values in the row, enter today's date in that column. Once you have completed entering the row data, sort the table by the date column.
0
The most effective solution will depend largely on how your workbook is constructed. I suggest the following:
Designate column A to track the dates and times at which new rows are added. You can then hide column A so nobody sees it (select the entire column and set the width to 0). Next, try the following macro:
Sub InsertRowWithDate()
Dim CurrentDate As String, CurrentTime As String
CurrentDate = Format(Date, "MMM DD, YYYY")
CurrentTime = Format(Time, "HHMM")
'Inserts a new row above the currently selected cell
Rows(ActiveCell.Row).Insert Shift:=xlDown, CopyOrigin:=xlFormatFromLeftOrAbove
'Inserts the current date and time into Column A of the row just inserted.
Cells(Application.ActiveCell.Row, "A").Value = CurrentDate & " " & CurrentTime
End Sub
this will insert a new row above whatever cell you have selected. The current date and time will be placed into your hidden column A.
Assign an easy to remember hot key, or button to this macro for easy access. Now you can simply sort your data by column A.
If you want your macro to automatically sort the data each time you insert a new row, we can make that happen too.
Let me know if this works for you.
1Excel doesn't have a way to track when cells were added so without a specific column stating when it was added you can't do this. – gtwebb – 2015-07-27T18:03:28.537
http://meta.superuser.com/q/10696/468548 – User15 – 2015-09-07T13:29:12.097