- ©«¤l
- 104
- ¥DÃD
- 10
- ºëµØ
- 0
- ¿n¤À
- 114
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 10
- ³nÅ骩¥»
- Office 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2021-6-21
- ³Ì«áµn¿ý
- 2021-8-24
|
¦^´_ 44# samwang
Application.ScreenUpdating = False
Application.DisplayAlerts = False
Application.AskToUpdateLinks = False
fileorg = ActiveWorkbook.Name
Set xD = CreateObject("Scripting.Dictionary")
For i1 = 1 To n1
If Not xD.Exists(Ar(i1, 1) & "") Then
xD(Ar(i1, 1) & "") = ""
For i = 1 To n
If Arr(i, 2) = Ar(i1, 1) Then n2 = n2 + 1: Ar1(n2, 1) = Arr(i, 1)
Next
End If
Next
R = 1: Sheets("6¤ë¥÷¼Æ¾Ú").Select
With Sheets("6¤ë¥÷¼Æ¾Ú")
If .FilterMode Then .ShowAllData
.Range("a1:AA" & .[a65536].End(3).Row).Delete
Tm = Timer
For i1 = 1 To n2
Set WB = Workbooks.Open(Ar1(i1, 1))
With Sheets("6¤ë¥÷¼Æ¾Ú")
If .FilterMode Then .ShowAllData
fn = Split(ActiveWorkbook.Name, ".")(0)
.Range("a1:z" & .[a65536].End(3).Row).Copy Workbooks(fileorg).Sheets("6¤ë¥÷¼Æ¾Ú").Range("a" & R)
End With
WB.Close
.Range("U" & R & ":U" & .[a65536].End(xlUp).Row) = fn
R = .[a65536].End(xlUp).Row + 1
Next
End With
MsgBox "¸ê®Æ½Æ»s§¹¦¨" & Timer - Tm & "¬í"
Erase Arr: Erase Ar
Unload Me
Application.ScreenUpdating = True
Application.DisplayAlerts = True
Application.AskToUpdateLinks = True
½Æ»s¸ê®Æªº®ÉÔ
Set WB = Workbooks.Open(Ar1(i1, 1))
³o¦æ¥X²{¤F¿ù»~
|
|