Private Sub Worksheet_Change(ByVal Target As Range)
rowcount = Cells(Cells.Rows.Count, "a").End(xlUp).Row
'you can change the column here change from d to whatever
Range("a1:" & "d" & rowcount).Select
'you can change the sort column here change from d to whatever
'you can change also if there is heater here form Header:=xlNo to Header:=xlYes
-- Range selected is say "A1:D29"
-- But your data actually occupies rows A6:D29
Selection.Sort Key1:=Range("C1"), Order1:=xlDescending, Header:=xlNo, _
OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom
-- This sort seems OK, but the data in Col C is constant in rows 6:29
-- and blank in the header rows, so it may seem to sort incorrectly.
Range("a6").Select
End Sub
Bookmarks