|
- Public Sub ssjss()
- Application.ScreenUpdating = False
- Dim arr As Variant, t As Variant
- Dim i As Long, r As Long
- With Sheets("Sheet1")
- r = .Cells(Rows.Count, 1).End(xlUp).Row
- arr = .Range("A1:M" & r)
- End With
- For i = 2 To UBound(arr)
- If arr(i, 1) <> Empty Then
- t = DateValue(arr(i, 1))
- arr(i, 13) = t 'arr(i, 1)
- If arr(i - 1, 1) = Empty Then arr(i - 1, 13) = t
- End If
- Next i
- [q24].Resize(UBound(arr), UBound(arr, 2)) = arr
- [q24].Resize(UBound(arr), UBound(arr, 2)).Sort key1:=[ac24], Header:=xlYes
- [ac24].Resize(UBound(arr), 1) = ""
- Application.ScreenUpdating = True
- MsgBox "ok!"
- End Sub
复制代码 |
|