
LG
这用代码很好解决 在你的工作表名称那里——右键——查看代码 把下面的代码全部复制进去,就可以了 Private Sub Worksheet_Change(ByVal Target As Range) If Target.Column = 1 Then '当A列的数据有改变时 i = Selection.Row j = Selection.Column Columns(A:A).Select '选中你要排序的列,这是A列,如是是ABC三列,则换为A:C Selection.Sort Key1:=Range(A1), Order1:=xlDescending, Header:=x
LGuess, _ OrderCustom:=1, MatchCase:=False, Orientation:=xlTopToBottom, SortMethod _ :=xlPinYin, D抗游住ataOption1:=xlSortNormal 'Key1:=Range(A1), 表示用A列进行排序 Cells(i直士, j).Select End If End Sub '这是你输入一个数,按回车后,自动排序,然后把光标移到下一个单元格