-----Original Message-----
Is there a way to perform an "auto" sort for a range of
cells? It is a list that I constantly add onto, but I'd
like it to "re-sort" by a certain column header after I
enter something new. Thank you.
.
Natalie
This sorts Sheet three on column A when there is a
calculation. I have assumed that You might have a
calculation in the sheet.
If not Prerss F9 the Calculate Key.
Paste this into a Module Save and close the workbook then
reopen and it will work.
Obviously change the sheets and range to suit.
Sub Auto_OPen()
Application.OnCalculate = "MySort"
End Sub
Sub MySort()
Dim rng As Range
Dim lastRow As Long
With Sheets("Sheet3")
lastRow = Application.WorksheetFunction.CountA(Range
("A:A"))
Set rng = Range(Cells(1, 1), Cells(lastRow, 4))
rng.Sort Key1:=Range("A7"), Order1:=xlAscending, _
Header:=xlGuess, OrderCustom:=1, MatchCase:=False, _
Orientation:=xlTopToBottom
End With
End Sub
Peter