|
参与一下。。。- Sub ykcbf() '//2024.1.18
- Application.ScreenUpdating = False
- Application.DisplayAlerts = False
- With Sheets("班组零工明细")
- r = .Cells(Rows.Count, 1).End(3).Row
- .Range("e5:m" & r).UnMerge
- For i = 5 To r
- st = Split(.Cells(i, 3), ".")
- nf = st(0)
- yf = Format(st(1), "00")
- rq = Format(st(2), "00")
- .Cells(i, "g") = Val(nf & yf & rq)
- Next
- Set Rng = .Range("c5:q" & r)
- Rng.Sort .[g5], 1
- For i = 5 To r
- .Range(.Cells(i, 5), .Cells(i, "m")).Merge
- Next
- End With
- Application.ScreenUpdating = True
- MsgBox "OK!"
- End Sub
复制代码
|
|