在excel中可以使用宏实现随内容改变自动排序,那么具体要怎么做呢,下面小编来告诉你吧。
EXCEL设置随内容改变自动排序的步骤:
把文档另存为“EXCEL 启用宏的工作簿”
文件-另存为-...

录制宏
视图-宏-录制宏-输入宏名


自动排序
选中需要排序的区域-开始-排序和筛选-自定义排序-按照需要设置排序规则


停止录制
视图-宏-停止录制

编辑代码
sheel1右键-查看代码-复制粘贴代码-保存-关闭代码编辑
说明:“1”和“7”为行序号,“1”和“5”为列序号,“自动排序”为宏名,根据需要自行修改
代码:
Private Sub Worksheet_Change(ByVal Target As Range) If (Target.Row >= 1) Then
If (Target.Row <= 7) Then
If ((Target.Column >= 1)) Then
If ((Target.Column <= 5)) Then 自动排序 End If End If
End If End IfEnd Sub


完成了,试下该数值吧!
