0
我正在尝试对选择中的每一行进行排序。例如:Excel VBA:对选中的每一行进行排序
排序前:
8 3 17
2 9 4
5 3 8
排序后:
3 8 17
2 4 9
3 5 8
我写了这个代码,但它不工作:
Public Sub SortByString()
Dim row As Range
For Each row In Selection.Rows
row.Sort Key1:=row, Order1:=xlAscending, Orientation:=xlSortColumns
Next row
End Sub
我在VBA新手。比我做错了?请帮忙。