buckwheat4948
New Member
- Joined
- Jun 10, 2011
- Messages
- 14
How do I sort the rows 11 to 65535 by the data in Column A that has the format "Jun 10 2011" or "Mar 01 2010" or "Apr 20 2011" from oldest on top to newest on bottom.
I currently use the following, but it sorts by first letter putting 'Jun 10 2011 before "Mar 10 2010":
Dim StRw As Integer, EndRw As Integer
For i = 1 To ThisWorkbook.Sheets.Count
Set NewSheet = ThisWorkbook.Sheets(i)
NewSheet.Activate
With NewSheet
StRw = 11 ' Starting Row
EndRw = Range("E65500").End(xlUp).Row
Rows(StRw & ":" & EndRw).Select
Selection.Sort Key1:=Range("A11"), Order1:=xlAscending
End With
Next i
Thanks!
I currently use the following, but it sorts by first letter putting 'Jun 10 2011 before "Mar 10 2010":
Dim StRw As Integer, EndRw As Integer
For i = 1 To ThisWorkbook.Sheets.Count
Set NewSheet = ThisWorkbook.Sheets(i)
NewSheet.Activate
With NewSheet
StRw = 11 ' Starting Row
EndRw = Range("E65500").End(xlUp).Row
Rows(StRw & ":" & EndRw).Select
Selection.Sort Key1:=Range("A11"), Order1:=xlAscending
End With
Next i
Thanks!