- ©«¤l
- 163
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 170
- ÂI¦W
- 0
- §@·~¨t²Î
- Window 7
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-9-5
- ³Ì«áµn¿ý
- 2022-7-20
|
¦^´_ 3# s12t34
¸Õ¸Õ¬Ý¡C- Sub test()
- Dim arr, brr(), mytime As Date
- ST = Timer
- mypath = ThisWorkbook.Path & "\"
- myname = "*.*"
- myfile = Dir(mypath & myname)
- Rows("2:65536").Delete
- Application.ScreenUpdating = False
- Do Until myfile = ""
- If myfile <> "Á`ªí.xls" Then
- Workbooks.OpenText Filename:=mypath + myfile, Comma:=True, DataType:=xlDelimited
- With ActiveWorkbook.ActiveSheet
- er = .[A65536].End(3).Row
- arr = .Range("A2:I" & er)
- For i = 1 To UBound(arr)
- If arr(i, 1) + arr(i, 2) > mytime Then
- n = n + 1
- ReDim Preserve brr(1 To 9, 1 To n)
- For j = 1 To 9
- brr(j, n) = arr(i, j)
- Next j
- End If
- Next i
- mytime = arr(er - 1, 1) + arr(er - 1, 2)
- .Parent.Close 0
- End With
- End If
- myfile = Dir
- Loop
- [A2].Resize(n, 9) = Application.Transpose(brr)
- Application.ScreenUpdating = True
- arr = ""
- Erase brr
- MsgBox Format(Timer - ST, "0.00’")
- End Sub
½Æ»s¥N½X |
|