¦hÓ¤£¦PÀɮפu§@ªí½Æ»s¶°¤¤¶K¨ì1ÓÀɮ׸̪º¤u§@ªí
- ©«¤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¿ý
- 2025-1-10
|
¥»©«³Ì«á¥Ñ samwang ©ó 2021-10-18 10:34 ½s¿è
¦^´_ 1# oak0723-1
¦³3Ó°ÝÃD¡A½Ð½T»{¹ê»Ú»Ý¨D¬°¦ó©ÎªÌ¥i°Ñ¦Ò«á¾Ç«Øij¡AÁÂÁÂ
1. Excel BÄ檺ÀɦW©M¹ê»ÚÀɦW¤£¤@¼Ë(¦³ªÅ¥Õ)®Én¦p¦ó³B¸m?
2. Excel CÄ檺¤u§@ªí¦WºÙ¦³¼g¿ù®Én¦p¦ó³B¸m?
3. Excel D¡BEÄæ°_©l/²×¤î¡An¥H¿é¤J¬°¥D¶Ü?
«Øij:
1. µ{¦¡ª½±µ¶}±Ò§ì¨ú¨ºÓ¸ê®Æ§¨ªºÀÉ®×
2. ±N©Ò¦³ÀɦW¶K¦Üsheet(¶°¤¤ (¥Ø¿ý)) ªºBÄæ
3. ±NÀɮתºsheet 1¸ê®Æ¶K¦Üsheet(¶°¤¤)¡A±qAÄæ¶}©l¶K¤J¸ê®Æ¨Ì§Ç©¹¥k¶K¨ìÀÉ®×µ²§ô |
-
-
1.PNG
(46.04 KB)
|
|
|
|
|
|
- ©«¤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¿ý
- 2025-1-10
|
¦^´_ 1# oak0723-1
B¡BCÄæ¦p¿é¤J¿ù»~«hFÄæ·|Åã¥Ü¿ù»~(±Æ°£BÄæªÅ®æ°ÝÃD)¡A½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, Ar(), xD, a, n%, T, sh$, wb As Workbook, ws As Worksheet
Tm = Timer
Application.ScreenUpdating = False
a = ThisWorkbook.Path
Arr = Sheets(1).Range([b1], [c65536].End(3))
fileOrg = ActiveWorkbook.Name
Set xD = CreateObject("Scripting.Dictionary")
Set fs = CreateObject("Scripting.FileSystemObject")
a = ThisWorkbook.Path
Set f = fs.GetFolder(a)
Set fc = f.Files
For Each f1 In fc
T = Replace(Split(f1.Name, ".")(0), " ", "")
xD(T) = f1.Path
Next
C = 1
For i = 3 To UBound(Arr)
T = Replace(Arr(i, 1), " ", "")
If xD.Exists(T) Then
Set wb = Workbooks.Open(xD(T))
sh = Arr(i, 2)
On Error Resume Next
Set ws = Worksheets(sh)
If Err <> 0 Then
wb.Close
Sheets(1).Cells(i, 6) = "¤u§@ªí¦WºÙ¦³¿ù»~"
Err.Clear: GoTo 99
End If
With Sheets(sh)
If .FilterMode Then .ShowAllData
Drr = .Range(.[m1], .[a65536].End(3))
s = s + 1
End With
wb.Close
Sheets("¶°¤¤").Cells(1, C).Resize(UBound(Drr), 13) = Drr
C = C + 13
Else
Sheets(1).Cells(i, 6) = "ÀɦW¦³¿ù»~"
End If
99: Next
Application.ScreenUpdating = True
Set wb = Nothing: Set ws = Nothing
MsgBox Timer - Tm
End Sub |
|
|
|
|
|
|
- ©«¤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¿ý
- 2025-1-10
|
¦^´_ 5# oak0723-1
À°§Ú¥[¤@ӱƧǥ\¯à¡A¤]´N¬O¨Ì¨CÓÀɮ׸ê®Æªº²Ä¤@Ä欰·Ç¥Ñ¤W¦Ü¤U¥Ñ¤p¦Ü¤j
>> קï¦p¤U¬õ¦r³¡¤À¡AÁÂÁÂ
Sub test()
Dim Arr, Brr, Drr, Ar(), xD, a, n%, T, sh$, wb As Workbook, ws As Worksheet
Tm = Timer
Application.ScreenUpdating = False: Application.DisplayAlerts = False
...
...
...
With Sheets(sh)
If .FilterMode Then .ShowAllData
R = .[a65536].End(3).row
With Range("a7:m" & R)
Brr = .Value
.Sort key1:=.Item(1), Order1:=1, Header:=2
End With
Drr = .Range("a1:m" & R)
.Range("a7:m" & R) = Brr
End With
wb.Close
Sheets("¶°¤¤").Cells(1, C).Resize(UBound(Drr), 13) = Drr
C = C + 13
...
...
..
Application.ScreenUpdating = True: Application.DisplayAlerts = True
Set wb = Nothing: Set ws = Nothing
MsgBox Timer - Tm
End Sub
|
|
|
|
|
|
|
- ©«¤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¿ý
- 2025-1-10
|
¦^´_ 7# oak0723-1
¨Ã¨S¦³¥H²Ä¤@Äæ¦ì¬°·Ç¥Ñ¤W¦Ü¤U¥Ñ¤p¦Ü¤j±Æ§Ç³á
>> ¦³¤p¤p±Æ¨ì¤j¦pªþ¥ó¡A§Ú²q¥i¯à¼ÆȬݤ£¥X¨Ó¡A¤w¸gÂର®É¶¡®æ¦¡¡A½Ð¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁ |
-
-
22.PNG
(55.19 KB)
|
|
|
|
|
|
- ©«¤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¿ý
- 2025-1-10
|
¦^´_ 7# oak0723-1
¹ï¤£°_¡A§Ñ¤FªþÀÉ¡A¤w¸É¤W¡A½Ð¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁ |
|
|
|
|
|
|