Я знаю, что у вас есть ответ, но так как вы хотели Sort
, этот код работает.
Sub SortMoveRowstolRow()
Dim fRow As Long, lRow As Long
With Range("A1").CurrentRegion
.Sort Key1:=Range("K1"), Order1:=xlAscending, Header:=xlNo
fRow = .Range("K:K").Find(what:=0, after:=.Range("K1"), Lookat:=xlWhole, searchdirection:=xlPrevious).Row
End With
Rows(1 & ":" & fRow).EntireRow.Cut Cells(Rows.Count, 1).End(xlUp).Offset(1, 0)
Rows(1 & ":" & fRow).EntireRow.Delete
End Sub