- ©«¤l
- 976
- ¥DÃD
- 7
- ºëµØ
- 0
- ¿n¤À
- 1018
- ÂI¦W
- 0
- §@·~¨t²Î
- Win10
- ³nÅ骩¥»
- Office 2016
- ¾\ŪÅv
- 50
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2013-4-19
- ³Ì«áµn¿ý
- 2024-10-30
|
¦^´_ 1# cclo0728
½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, SD As Date, y2, m2, d2, i&, j%, n%
Application.ScreenUpdating = False
Tm = Timer
With Range("a1").CurrentRegion
Arr = .Value
For i = 2 To UBound(Arr)
y2 = Format(Left(Arr(i, 11), 4), "0000")
m2 = Format(Mid(Arr(i, 11), 5, 2), "00")
d2 = Format(Mid(Arr(i, 11), 7, 2), "00")
SD = DateSerial(y2, m2, d2)
If SD < Date Then
n = n + 1
For j = 1 To UBound(Arr, 2): Arr(n, j) = Arr(i, j): Next
End If
Next
If n > 0 Then
.Range("a1").CurrentRegion.Offset(1) = ""
.Range("a2").Resize(n, UBound(Arr, 2)) = Arr
End If
End With
Application.ScreenUpdating = True
MsgBox Timer - Tm
End Sub |
|