|
- Sub Macro1()
- Dim rng As Range, n&, s&
- n = Range("b65536").End(xlUp).Row
- [d:d].Replace "入", "a入", lookat:=xlPart
- Range([b4], Cells(n, "s")).Sort Key1:=[b5], Key2:=[c5], Key3:=[d5], Header:=xlGuess
- Set rng = [b:b].Find(1, lookat:=xlWhole, searchdirection:=xlPrevious)
- [d:d].Replace "a入", "入", lookat:=xlPart
- If Not rng Is Nothing Then
- s = rng.Row
- Range([a5], Cells(s, "s")).Cut (Cells(n + 1, 1))
- Range([a5], Cells(s, "s")).Delete Shift:=xlUp
- End If
- End Sub
复制代码 |
|