ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

[µo°Ý] ±N¶}±Ò«áÀɮתº«ü©w¤º®e¨Ì§Ç½Æ»s¶K¤W¡C

[µo°Ý] ±N¶}±Ò«áÀɮתº«ü©w¤º®e¨Ì§Ç½Æ»s¶K¤W¡C

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2021-8-21 15:04 ½s¿è

TEST.rar (39.3 KB)
³Æµù¡G
7C¾÷¸ê®Æ§¨¤º¦@¦³1~98­ÓÀÉ®×(¥»ÃD¥H5­ÓÀɮ׬°¨Ò)¡C

»Ý¨D¡G
½Ð±N7C¾÷¸ê®Æ§¨¤ºªº¦Û°Ê¶}±ÒÀɮסA¥H¦WºÙªº²Ä4¬q¼Æ¦r¬°°ò·Ç(EX¡G7C¾÷_1878´Á_100_1877-10_1¦¸)~
¥Ñ¤j¦Ó¤p~±N¦U¤w¶}±ÒªºÀɮפº¤§"¾÷²vªí!"A&B¤GÄ檺¤º®e½Æ»s«á¡A¨Ì§Ç¶K¤W¥DÀɤ§"Sheet1!"ªºM1¡C

½Ð¸Ô¨£7C_0_1878´Á_5­Ó(®ÄªGÀÉ)¡C

¥H¤Wªº»Ý¨D»yªk
Àµ½Ð¦U¦ì¤j¤jÀ°¦£©M«ü±Ð ! ÁÂÁ !

¦^´_ 13# samwang
samwang¤j¤j :
OK¤F!
ÁÂÁ±z¤£¹½¨ä·Ðªº«ü¾É©MÀ°¦£~·P®¦

TOP

¦^´_ 12# ziv976688


¶K¤W¥»ÃD¥DÀɪºµ{¦¡½X¦C55®M¥Î¡A·|¦b¦C62  For j = 2 To 8: n = n + 1: Brr(n) = Arr(i, j): Next ¤¤Â_(°}¦C¯Á¤Þ¶W¥X½d³ò)¡C

>> ¦]¬° n «e­±µ{¦¡½X¤w¦³¨Ï¥Î¹L¥B¦³¼Æ­È¡A©Ò¥H±Nn§ïm §Y¥i¡AFor j = 2 To 8: m = m + 1: Brr(m) = Arr(i, j): Next ,ÁÂÁ  

TOP

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2021-8-31 10:06 ½s¿è

¦^´_ 10# samwang
½Ð­×¥¿µ{¦¡½X
TEST_0831.rar (228.8 KB)
¤£¦n·N«ä~±Nhttp://forum.twbts.com/viewthrea ... a=pageD1&page=2 10¼Ó­×¥¿«áªºµ{¦¡½X¡A
¶K¤W¥»ÃD¥DÀɪºµ{¦¡½X¦C55®M¥Î¡A·|¦b¦C62  For j = 2 To 8: n = n + 1: Brr(n) = Arr(i, j): Next ¤¤Â_(°}¦C¯Á¤Þ¶W¥X½d³ò)¡C
¤£ª¾­n¦p¦ó­×¥¿?¤~¯àÅýSheet1!C : K²£¥Í¥¿½Tµª®×¡C
¥H¤W Àµ½Ð½ç¥¿¡CÁÂÁ±z

TOP

¦^´_ 10# samwang
Sorry~­ì¨Ó¬O§Ú¦b¶K8#ªºµ{¦¡½X®É¡A´N²¨©¿¿òº|¤F

©Ò¦³»Ý­n¤H¤u¾Þ§@ªº³¡¤À~³£¥Hµ{¦¡½X§¹¦¨´À¥N¨Ã´ú¸Õ¦¨¥\
¸U¤À·P¿E±zªº­@¤ß«ü¾É©M¼ö¤ßÀ°¦£~¨ü´f¨}¦h~·P®¦

TOP

¥»©«³Ì«á¥Ñ samwang ©ó 2021-8-24 09:34 ½s¿è

¦^´_ 9# ziv976688

¹ï­n©w¸q¡A8#¦³¤Ï¬õ¦â¦³©w¸q¡A½Ð¦A´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Dim Path As String, a, Ar(1 To 1000, 1 To 2), Ar1( )  

TOP

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2021-8-24 09:15 ½s¿è

¦^´_ 8# samwang
samwang¤j¤j : ±z¦n !
·PÁ½ç±Ð

´ú¸Õ«á¡A¦b¦C33   ReDim Preserve Ar1(n1)  ½s¿è¿ù»~(Åܼƥ¼©w¸q)
½Ð°Ý : ³o­ÓÅܼƭn«ç»ò¤U©w¸q?

Private Sub CommandButton1_Click()
Dim Path As String, a, Ar(1 To 1000, 1 To 2), Ar1( )
³o¼Ë¹ï¶Ü?
ÁÂÁ±z

TOP

¥»©«³Ì«á¥Ñ samwang ©ó 2021-8-24 08:09 ½s¿è

¦^´_ 7# ziv976688


¥H¦U¸ê®Æ§¨¦WºÙªº²Ä5¬q¼Æ¦r¬°°ò·Ç(EX¡G7C _0_1878´Á_100_1877-10_1¦¸)~¥Ñ¤j¦Ó¤p¶}±Òªºµ{¦¡½X¡F
µM«á±N¦U¶}±Ò«áªº¸ê®Æ§¨¤¤¦³ÃöÁä¦r"¾÷"ªºÀÉ®×(EX¡G7C¾÷_1878´Á_100_1877-10_1¦¸)¶}±Ò~
¦A±N¸Ó¶}±Ò«áªºÀɮפº¤§"¾÷²vªí"ªºA&B¤GÄ椺®e½Æ»s«á¡A
¨Ì§Ç¥Ñ¥DÀɤ§"Sheet1!"ªºM1©¹¥k¶K¤W¡C
>> µ{¦¡¦p¤U¡A½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ

Private Sub CommandButton1_Click()
Dim Path$, a, Ar(1 To 1000, 1 To 2), Ar1()
Nrange = "1878" ' InputBox("½Ð¿é¤JDATA!ªº¶}¼ú´Á¼Æ", "¿é¤J´Á¼Æ")
Tm = Timer
[L1] = ""
Application.DisplayAlerts = False
Application.ScreenUpdating = False

Set fs = CreateObject("Scripting.FileSystemObject")
a = ThisWorkbook.Path     '¨C­Ó¸ê®Æ§¨¦WºÙ¸Ë¤JAr
Set f = fs.GetFolder(a)
Set fc = f.SubFolders
For Each f1 In fc
    n = n + 1
    Ar(n, 1) = f1.Path
    Ar(n, 2) = Split(Split(f1.Name, "_")(4), "-")(0)
Next
For i = 1 To UBound(Ar)   'Ar¥Ñ¤j¦Ü¤p±Æ§Ç
For j = i + 1 To UBound(Ar)
    If Ar(i, 2) < Ar(j, 2) Then
        a = Ar(i, 1)
        Ar(i, 1) = Ar(j, 1)
        Ar(j, 1) = a
    End If
Next j
Next i

For i = 1 To n            '¶}±ÒAr¡A§äÀɦW¦³"¾÷"¸Ë¤JAr1
    Set f = fs.GetFolder(Ar(i, 1))
    Set fc = f.Files
    For Each f1 In fc
        If InStr(f1.Path, "¾÷") Then
            ReDim Preserve Ar1(n1)
            Ar1(n1) = f1.Path
            n1 = n1 + 1
        End If
    Next f1
Next i

fileOrg = ActiveWorkbook.Name
C = 13
If n1 > 0 Then
    For i1 = 0 To n - 1   '¶}±ÒAr1¡Acopy A¡BBÄæ¸ê®Æ¨ìSheet1 MÄæ¶}©l©¹¥k
        Set WB = Workbooks.Open(Ar1(i1))
        With Sheets(1)
            If .FilterMode Then .ShowAllData
            .Range("a1:b" & .[a65536].End(3).Row).Copy Workbooks(fileOrg).Sheets("Sheet1").Cells(1, C)
             C = C + 2
        End With
        WB.Close
    Next
End If
Set fs = Nothing: Set f = Nothing: Set fc = Nothing


  
With Sheets("Sheet1")
    .[A1] = Nrange
...
...

TOP

¥»©«³Ì«á¥Ñ ziv976688 ©ó 2021-8-23 21:39 ½s¿è

¦^´_ 5# samwang
TEST_0823.rar (225.26 KB)
Samwang¤j¤j¡G±z¦n!
·Q¥H 5#ªº¶Q¸Ñµ{¦¡½X¦A¶i¶¥¡G
½Ð±N­ì¶Q¸Ñ¡G¥H¦UÀɮצWºÙªº²Ä4¬q¼Æ¦r¬°°ò·Ç(EX¡G7C¾÷_1878´Á_100_1877-10_1¦¸)~¥Ñ¤j¦Ó¤p¶}±Òªºµ{¦¡½X~
¶i¶¥¬°¡G¥H¦U¸ê®Æ§¨¦WºÙªº²Ä5¬q¼Æ¦r¬°°ò·Ç(EX¡G7C _0_1878´Á_100_1877-10_1¦¸)~¥Ñ¤j¦Ó¤p¶}±Òªºµ{¦¡½X¡F
µM«á±N¦U¶}±Ò«áªº¸ê®Æ§¨¤¤¦³ÃöÁä¦r"¾÷"ªºÀÉ®×(EX¡G7C¾÷_1878´Á_100_1877-10_1¦¸)¶}±Ò~
¦A±N¸Ó¶}±Ò«áªºÀɮפº¤§"¾÷²vªí"ªºA&B¤GÄ椺®e½Æ»s«á¡A
¨Ì§Ç¥Ñ¥DÀɤ§"Sheet1!"ªºM1©¹¥k¶K¤W¡C
½Ð¸Ô¨£7C_0_1878´Á_5­Ó(®ÄªGÀÉ)
PS¡G®ÄªGÀɪº¤º®e»P5¼Óªº®ÄªGÀɬۦP¡C


¥H¤W Àµ½Ð½ç±Ð ! ÁÂÁ±z !

TOP

¦^´_ 5# samwang
OK¤F
ÁÂÁ±z¤@¦Aªº«ü¾É©MÀ°¦£~·P®¦

TOP

        ÀR«ä¦Û¦b : ªY½à§O¤H´N¬O²øÄY¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD