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

½Ð°Ýsumif §ï¼g¦¨¦r¨å©Î¬OarrayÅý°õ¦æ³t«×ÅܧÖ

¦^´_ 30# s3526369
­n¬Ý¼Ò²Õ Module2

TOP

¦^´_  Andy2483

«e½ú~§A¬Ý¬Ý³o­Ó,§Ú®M¥Îsamwang«e½ú¤è¦¡¥h¾ã²z¥X¨Ó!
°õ¦æ³t«×«Ü§Ö,¦ý¬O¥Ø«e¹J¨ìªº°ÝÃD ...
s3526369 µoªí©ó 2022-9-16 16:45



ªþ¥ó¬Ý¤£¥X­þ¸Ì¦³¤½¦¡¡A«á¾Ç¥ú¬Ý¨º¨Çµ{¦¡½X´N§Ö....¡A±z³£¥i¥H®M¥Î¼g¥X¡A«Øij±N­ì¨Ó¦³¤½¦¡°Ï¥i¥HÂনVBA¡A
³o¼Ë¤]¥i¥H´£¤É®Ä²v¡AÁÂÁÂ

TOP

¥»©«³Ì«á¥Ñ s3526369 ©ó 2022-9-17 00:16 ½s¿è

¦^´_ 32# samwang

«e½ú§A¦n~§Ú­Ü®w®w¦sA.B¬O³sµ²§÷®Æªíªº¸ê®Æ,§Ú­«·s¤W¶Çªþ¥ó!

­Ü®w¦X­pTEST2.rar (626.37 KB)

TOP

¦^´_  samwang

«e½ú§A¦n~§Ú­Ü®w®w¦sA.B¬O³sµ²§÷®Æªíªº¸ê®Æ,§Ú­«·s¤W¶Çªþ¥ó!
s3526369 µoªí©ó 2022-9-17 00:14


½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ

­Ü®w¦X­pTEST2_0917.zip (627.58 KB)

TOP

¤Ó¼F®`¤F!
33# ²»Às¤Q¤K´x
34# ¥´³q¥ô·þ¤G¯ß

TOP

¦^´_ 33# s3526369


    ´£¿ô«e½ú
¤U¤è¬õ¦r³B¶·§ï¬°2

Sub ­Ü®w®w¦s()
Dim Arr, xD, xD1, xD2, xD3, xD4, xD5, xD6, xD7, T$, i&, QA, QB
Set xD = CreateObject("Scripting.Dictionary")   '¤J®w¦X­p
Set xD1 = CreateObject("Scripting.Dictionary")  '¤½¥qÁ`»Ý¨D
Set xD2 = CreateObject("Scripting.Dictionary")  'A­Ü
Set xD3 = CreateObject("Scripting.Dictionary")  'B­Ü
Set xD4 = CreateObject("Scripting.Dictionary")  'Á`¥X³f
Set xD5 = CreateObject("Scripting.Dictionary")  '½LÂI¼Æ'
Set xD6 = CreateObject("Scripting.Dictionary") '°h®w
Set xD7 = CreateObject("Scripting.Dictionary")  '¼o®Æ
TM = Timer
With Sheets("¤J®w©ú²Ó")
    Arr = .Range(.[r1], .[o65536].End(3))
    For i = 2 To UBound(Arr)
        T = Arr(i, 1): xD(T) = xD(T) + Arr(i, 4) '¤J®w¦X­p
    Next
End With
With Sheets("¥þ¾÷ºØBOM")
    Arr = .Range(.[Z1], .[p65536].End(3))
    For i = 2 To UBound(Arr)
        T = Arr(i, 1): xD1(T) = xD1(T) + Arr(i, 11) '¤½¥qÁ`»Ý¨D
    Next
End With
With Sheets("A»Ý¨D")
    Arr = .Range(.[h1], .[A65536].End(3))
    For i = 4 To UBound(Arr)
        T = Arr(i, 1): xD2(T) = xD2(T) + Arr(i, 8)  'A­Ü
    Next
End With
With Sheets("B»Ý¨D")
    Arr = .Range(.[h1], .[A65536].End(3))
    For i = 4 To UBound(Arr)
        T = Arr(i, 1): xD3(T) = xD3(T) + Arr(i, 8)  'B­Ü
    Next
End With
With Sheets("«ü¹Ï©ú²Ó")
    Arr = .Range(.[L1], .[f65536].End(3))
    For i = 4 To UBound(Arr)
        T = Arr(i, 1): xD4(T) = xD4(T) + Arr(i, 7)  'Á`¥X³f
    Next
End With
With Sheets("¤½¥q½LÂI")
    Arr = .Range(.[G1], .[A65536].End(3))
    For i = 4 To UBound(Arr)
        T = Arr(i, 1): xD5(T) = xD5(T) + Arr(i, 7)  '¤½¥q½LÂI
    Next
End With

With Sheets("°h®w")
    Arr = .Range(.[C1], .[A65536].End(3))
    For i = 3 To UBound(Arr)
        T = Arr(i, 1): xD6(T) = xD6(T) + Arr(i, 3)  'B­Ü
    Next
End With
With Sheets("¼o®Æ­Ü")
    Arr = .Range(.[C1], .[A65536].End(3))
    For i = 3 To UBound(Arr)
        T = Arr(i, 1): xD7(T) = xD7(T) + Arr(i, 3)  'B­Ü
    Next
End With

With Sheets("­Ü®w®w¦s")
    Arr = .Range(.[m3], .[A65536].End(3))
    For i = 2 To UBound(Arr)
        T = Arr(i, 1)
        QA = xD5(T) + xD(T) ' ''­Ü®w®w¦s
        QB = xD6(T) + xD7(T)
        Arr(i, 5) = xD(T)    '¤J®w¦X­p
        Arr(i, 13) = xD4(T)  'Á`¥X³f
        Arr(i, 3) = xD1(T)   'Á`»Ý¨D
        Arr(i, 8) = QA - QB - xD2(T) - xD3(T) - xD4(T)  '¤½¥q­Ü
        Arr(i, 9) = xD3(T)   'B­Ü
        Arr(i, 10) = xD2(T)  'A­Ü
        Arr(i, 7) = QA - QB - xD4(T)  'Á`¼Æ
        Arr(i, 4) = xD5(T)
        Arr(i, 11) = xD6(T)
        Arr(i, 12) = xD7(T)
        
        If Arr(i, 3) > 0 Then
        XA = xD5(T) + xD(T) - xD6(T) - xD7(T) - Arr(i, 3)
            If XA >= 0 Then XA = "0"
        Else
            XA = "0"
        End If
        If xD(T) = 0 Then Arr(i, 5) = "0"
        If xD5(T) = 0 Then Arr(i, 4) = "0"
        If xD1(T) = 0 Then Arr(i, 3) = "0"
        If xD4(T) = 0 Then Arr(i, 13) = "0"
   Arr(i, 6) = XA
    Next
    .[a3].Resize(UBound(Arr), 13) = Arr
End With
'MsgBox "¦@¯Ó®É¡G" & Timer - TM & " ¬í"
End Sub

TOP

ÁÂÁ ¨â¦ì«e½ú
¤µ¤Ñ²ß±o
1.­Ë¤J¦r¨å°j°é¤Æ
2.¹w³]2±ø¥ó§k¦X¤~¥[Á`
  1. Option Explicit
  2. Sub ­Ü®w®w¦s_20220917()
  3. Application.ScreenUpdating = False
  4. Dim x&, i&, ­È(1 To 17) As Long, QA, QB, T, S, Srr, Arr, Ac, xR, C
  5. Dim Trr, Brr, Crr, Rs, Rq1s, Rq1n, Ras, Ran, B, Äæd, ¯Srr, Drr
  6. Dim Rq2s, Rq2n, XA
  7. T = Timer
  8. Set Srr = CreateObject("Scripting.Dictionary")
  9. Set Trr = CreateObject("Scripting.Dictionary")
  10. Set ¯Srr = CreateObject("Scripting.Dictionary")
  11.       '        0        1       2        3     4       5       6      7     8
  12. S = Split("­Ü®w®w¦s,¤J®w©ú²Ó,¥þ¾÷ºØBOM,A»Ý¨D,B»Ý¨D,«ü¹Ï©ú²Ó,¤½¥q½LÂI,°h®w,¼o®Æ­Ü", ",")
  13. For i = 1 To UBound(S)
  14.    Set Srr(i) = Sheets(S(i))
  15.    Set Trr(i) = CreateObject("Scripting.Dictionary")
  16.    Set ¯Srr(i) = CreateObject("Scripting.Dictionary")
  17. Next
  18. Rs = Rows.Count
  19. Ac = Sheets(S(0)).Cells(Rs, 1).End(3).Row
  20. Arr = Range(Sheets(S(0)).[N4], Sheets(S(0)).Cells(Ac, 1))
  21.                   'vS, vC,zS, zC,xS,xC,zS, zC,zV
  22. ¯Srr(1) = Array("", 1, 18, 1, 15, 0, 1, 1, 99, "") '¤J®w¦X­p
  23. ¯Srr(2) = Array("", 2, 26, 2, 16, 0, 1, 2, 99, "") '¤½¥qÁ`»Ý¨D
  24. ¯Srr(3) = Array("", 3, 8, 3, 1, 0, 1, 3, 99, "") 'A­Ü
  25. ¯Srr(4) = Array("", 4, 8, 4, 1, 0, 1, 4, 99, "")  'B­Ü
  26. ¯Srr(5) = Array("", 5, 12, 5, 6, 0, 1, 5, 99, "") 'Á`¥X³f
  27. ¯Srr(6) = Array("", 6, 7, 6, 1, 0, 1, 6, 99, "")  '¤½¥q½LÂI
  28. ¯Srr(7) = Array("", 7, 3, 7, 1, 0, 1, 7, 99, "")  'B­Ü
  29. ¯Srr(8) = Array("", 8, 3, 8, 1, 0, 1, 8, 99, "")  'B­Ü
  30. For i = 1 To UBound(S)
  31.    Set Rq1s = Srr(¯Srr(i)(3)).Cells(1, ¯Srr(i)(4))
  32.    Set Rq1n = Srr(¯Srr(i)(3)).Cells(Rs, ¯Srr(i)(4)).End(3)
  33.    Brr = Srr(¯Srr(i)(3)).Range(Rq1s, Rq1n)
  34.    
  35.    Set Rq2s = Srr(¯Srr(i)(7)).Cells(1, ¯Srr(i)(8))
  36.    Set Rq2n = Srr(¯Srr(i)(7)).Cells(Rq1n.Row, ¯Srr(i)(8))
  37.    Drr = Srr(¯Srr(i)(7)).Range(Rq2s, Rq2n)

  38.    Set Ras = Srr(¯Srr(i)(1)).Cells(1, ¯Srr(i)(2))
  39.    Set Ran = Srr(¯Srr(i)(1)).Cells(Rq1n.Row, ¯Srr(i)(2))
  40.    Crr = Srr(¯Srr(i)(1)).Range(Ras, Ran)
  41.    For x = 1 To UBound(Brr)
  42.       B = Brr(x, 1)
  43.       If InStr(Drr(x, 1), ¯Srr(i)(9)) Or Drr(x, 1) & ¯Srr(i)(9) = "" Then
  44.          Trr(i)(B) = Trr(i)(B) + Crr(x, 1)
  45.       End If
  46.    Next
  47. Next
  48. For i = 1 To Ac - 3
  49.    xR = Arr(i, 1)
  50.    QA = Trr(1)(xR) + Trr(6)(xR) '­Ü®w®w¦s
  51.    QB = Trr(7)(xR) + Trr(8)(xR)
  52.    Arr(i, 5) = Trr(1)(xR)    '¤J®w¦X­p
  53.    Arr(i, 13) = Trr(5)(xR)  'Á`¥X³f
  54.    Arr(i, 3) = Trr(2)(xR)   'Á`»Ý¨D
  55.    Arr(i, 8) = QA - QB - Trr(3)(xR) - Trr(4)(xR) - Trr(5)(xR) '¤½¥q­Ü
  56.    Arr(i, 9) = Trr(4)(xR)   'B­Ü
  57.    Arr(i, 10) = Trr(3)(xR)  'A­Ü
  58.    Arr(i, 7) = QA - QB - Trr(5)(xR)  'Á`¼Æ
  59.    Arr(i, 4) = Trr(6)(xR)
  60.    Arr(i, 11) = Trr(7)(xR)
  61.    Arr(i, 12) = Trr(8)(xR)
  62.    If Arr(i, 3) > 0 Then
  63.       XA = Trr(6)(xR) + Trr(1)(xR) - Trr(7)(xR) - Trr(8)(xR) - Arr(i, 3)
  64.       If XA >= 0 Then XA = 0
  65.       Else
  66.          XA = 0
  67.    End If
  68.    If Trr(1)(xR) = 0 Then Arr(i, 5) = 0
  69.    If Trr(6)(xR) = 0 Then Arr(i, 4) = 0
  70.    If Trr(2)(xR) = 0 Then Arr(i, 3) = 0
  71.    If Trr(5)(xR) = 0 Then Arr(i, 13) = 0
  72.    Arr(i, 6) = XA
  73. Next i
  74. C = Array(, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
  75. For i = 1 To UBound(C)
  76.    Sheets(S(0)).Cells(4, C(i)).Resize(UBound(Arr), 1) = Application.Index(Arr, , C(i))
  77. Next
  78. MsgBox "¦@¯Ó®É¡G" & Timer - T & " ¬í"
  79. End Sub
½Æ»s¥N½X

TOP

¦^´_ 37# Andy2483


        ÁÂÁ½׾Â
        ÁÂÁ¦U¦ì«e½ú
²§·Q¤Ñ¶}!´ú¸ÕOK
Set Srr(i) = Sheets(S(i))
§ï¬°
Set Srr(i) = Sheets(S(i)).Cells
«á¤èªºCells³£¥i¥H¬Ù²¤
  1. Option Explicit
  2. Sub ­Ü®w®w¦s_20220919()
  3. Application.ScreenUpdating = False
  4. Dim x&, i&, QA, QB, T, S, Srr, Arr, Ac, xR, C
  5. Dim Trr, Brr, Crr, Rs, Rq1s, Rq1n, Ras, Ran, B, ¯Srr, Drr
  6. Dim Rq2s, Rq2n, XA
  7. T = Timer
  8. Set Srr = CreateObject("Scripting.Dictionary")
  9. Set Trr = CreateObject("Scripting.Dictionary")
  10. Set ¯Srr = CreateObject("Scripting.Dictionary")
  11.       '        0        1       2        3     4       5       6      7     8
  12. S = Split("­Ü®w®w¦s,¤J®w©ú²Ó,¥þ¾÷ºØBOM,A»Ý¨D,B»Ý¨D,«ü¹Ï©ú²Ó,¤½¥q½LÂI,°h®w,¼o®Æ­Ü", ",")
  13. For i = 1 To UBound(S)
  14.    Set Srr(i) = Sheets(S(i)).Cells
  15.    Set Trr(i) = CreateObject("Scripting.Dictionary")
  16.    Set ¯Srr(i) = CreateObject("Scripting.Dictionary")
  17. Next
  18. Rs = Rows.Count
  19. Ac = Sheets(S(0)).Cells(Rs, 1).End(3).Row
  20. Arr = Range(Sheets(S(0)).[N4], Sheets(S(0)).Cells(Ac, 1))
  21.                   'vS, vC,zS, zC,xS,xC,zS, zC,zV
  22. ¯Srr(1) = Array("", 1, 18, 1, 15, 0, 1, 1, 99, "") '¤J®w¦X­p
  23. ¯Srr(2) = Array("", 2, 26, 2, 16, 0, 1, 2, 99, "") '¤½¥qÁ`»Ý¨D
  24. ¯Srr(3) = Array("", 3, 8, 3, 1, 0, 1, 3, 99, "") 'A­Ü
  25. ¯Srr(4) = Array("", 4, 8, 4, 1, 0, 1, 4, 99, "")  'B­Ü
  26. ¯Srr(5) = Array("", 5, 12, 5, 6, 0, 1, 5, 99, "") 'Á`¥X³f
  27. ¯Srr(6) = Array("", 6, 7, 6, 1, 0, 1, 6, 99, "")  '¤½¥q½LÂI
  28. ¯Srr(7) = Array("", 7, 3, 7, 1, 0, 1, 7, 99, "")  'B­Ü
  29. ¯Srr(8) = Array("", 8, 3, 8, 1, 0, 1, 8, 99, "")  'B­Ü
  30. For i = 1 To UBound(S)
  31.    Set Rq1s = Srr(¯Srr(i)(3))(1, ¯Srr(i)(4))
  32.    Set Rq1n = Srr(¯Srr(i)(3))(Rs, ¯Srr(i)(4)).End(3)
  33.    Brr = Srr(¯Srr(i)(3)).Range(Rq1s, Rq1n)
  34.   
  35.    Set Rq2s = Srr(¯Srr(i)(7))(1, ¯Srr(i)(8))
  36.    Set Rq2n = Srr(¯Srr(i)(7))(Rq1n.Row, ¯Srr(i)(8))
  37.    Drr = Srr(¯Srr(i)(7)).Range(Rq2s, Rq2n)

  38.    Set Ras = Srr(¯Srr(i)(1))(1, ¯Srr(i)(2))
  39.    Set Ran = Srr(¯Srr(i)(1))(Rq1n.Row, ¯Srr(i)(2))
  40.    Crr = Srr(¯Srr(i)(1)).Range(Ras, Ran)
  41.    For x = 1 To UBound(Brr)
  42.       B = Brr(x, 1)
  43.       If InStr(Drr(x, 1), ¯Srr(i)(9)) Or Drr(x, 1) & ¯Srr(i)(9) = "" Then
  44.          Trr(i)(B) = Trr(i)(B) + Crr(x, 1)
  45.       End If
  46.    Next
  47. Next
  48. For i = 1 To Ac - 3
  49.    xR = Arr(i, 1)
  50.    QA = Trr(1)(xR) + Trr(6)(xR) '­Ü®w®w¦s
  51.    QB = Trr(7)(xR) + Trr(8)(xR)
  52.    Arr(i, 5) = Trr(1)(xR)    '¤J®w¦X­p
  53.    Arr(i, 13) = Trr(5)(xR)  'Á`¥X³f
  54.    Arr(i, 3) = Trr(2)(xR)   'Á`»Ý¨D
  55.    Arr(i, 8) = QA - QB - Trr(3)(xR) - Trr(4)(xR) - Trr(5)(xR) '¤½¥q­Ü
  56.    Arr(i, 9) = Trr(4)(xR)   'B­Ü
  57.    Arr(i, 10) = Trr(3)(xR)  'A­Ü
  58.    Arr(i, 7) = QA - QB - Trr(5)(xR)  'Á`¼Æ
  59.    Arr(i, 4) = Trr(6)(xR)
  60.    Arr(i, 11) = Trr(7)(xR)
  61.    Arr(i, 12) = Trr(8)(xR)
  62.    If Arr(i, 3) > 0 Then
  63.       XA = Trr(6)(xR) + Trr(1)(xR) - Trr(7)(xR) - Trr(8)(xR) - Arr(i, 3)
  64.       If XA >= 0 Then XA = 0
  65.       Else
  66.          XA = 0
  67.    End If
  68.    If Trr(1)(xR) = 0 Then Arr(i, 5) = 0
  69.    If Trr(6)(xR) = 0 Then Arr(i, 4) = 0
  70.    If Trr(2)(xR) = 0 Then Arr(i, 3) = 0
  71.    If Trr(5)(xR) = 0 Then Arr(i, 13) = 0
  72.    Arr(i, 6) = XA
  73. Next i
  74. C = Array(, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13)
  75. For i = 1 To UBound(C)
  76.    Sheets(S(0)).Cells(4, C(i)).Resize(UBound(Arr), 1) = Application.Index(Arr, , C(i))
  77. Next
  78. MsgBox "¦@¯Ó®É¡G" & Timer - T & " ¬í"
  79. End Sub
½Æ»s¥N½X

TOP

¦^´_ 33# s3526369


    ´£¿ô«e½úÃö©ó Sub A»Ý¨D()
1.Arr(i, 3) ¨S¦³¶ñ¤J­È
2.xD3¦r¨å³Ð«Ø«á¨S¦³³Q¨Ï¥Î
3.¨D¥Xªº­È»P ªì©lªº½d¨Ò  ­Ü®w¦X­p.rar  ¦³®t²§

TOP

ÁÂÁ ¨â¦ì«e½ú
¤µ¤Ñ²ß±o
1.­Ë¤J¦r¨å°j°é¤Æ
2.¹w³]2±ø¥ó§k¦X¤~¥[Á`
Andy2483 µoªí©ó 2022-9-17 16:58


2.¹w³]2±ø¥ó§k¦X¤~¥[Á`®M¤J A»Ý¨D ¥i¥H¥Î
  1. Option Explicit
  2. Sub A»Ý¨D_20220919()
  3. Application.ScreenUpdating = False
  4. Dim x&, i&, QA, QB, T, S, Srr, Arr, Ac, xR, C
  5. Dim Trr, Brr, Crr, Rs, Rq1s, Rq1n, Ras, Ran, B, ¯Srr, Drr
  6. Dim Rq2s, Rq2n, XA
  7. T = Timer
  8. Set Srr = CreateObject("Scripting.Dictionary")
  9. Set Trr = CreateObject("Scripting.Dictionary")
  10. Set ¯Srr = CreateObject("Scripting.Dictionary")
  11.       '        0     1       2        3        4         5        6        7
  12. S = Split("A»Ý¨D,¤J®w©ú²Ó,¥X®w©ú²Ó,¥þ¾÷ºØBOM,«ü¹Ï©ú²Ó,¤½¥q½LÂI,¤½¥q½LÂI,¤½¥q½LÂI", ",")
  13. For i = 1 To UBound(S)
  14.    Set Srr(i) = Sheets(S(i)).Cells
  15.    Set Trr(i) = CreateObject("Scripting.Dictionary")
  16.    Set ¯Srr(i) = CreateObject("Scripting.Dictionary")
  17. Next
  18. Rs = Rows.Count
  19. Ac = Sheets(S(0)).Cells(Rs, 1).End(3).Row
  20. Arr = Range(Sheets(S(0)).[H4], Sheets(S(0)).Cells(Ac, 1))
  21.                   'vS, vC,zS, zC,xS,xC,zS, zC,zV
  22. ¯Srr(1) = Array("", 1, 18, 1, 15, 0, 1, 1, 19, "A­Ü") '¤J®w¦X­p
  23. ¯Srr(2) = Array("", 2, 18, 2, 15, 0, 1, 2, 19, "A­Ü") '¥X®w¦X­p
  24. ¯Srr(3) = Array("", 3, 26, 3, 16, 0, 1, 3, 20, "A­Ü") '¥þ¾÷ºØBOM-Á`»Ý¨D
  25. ¯Srr(4) = Array("", 4, 12, 4, 6, 0, 1, 4, 10, "A­Ü")  '«ü¹Ï©ú²Ó-Á`¥X³f
  26. ¯Srr(5) = Array("", 5, 6, 5, 1, 0, 1, 5, 99, "") '¤½¥q½LÂI-A­Ü
  27. ¯Srr(6) = Array("", 6, 11, 6, 1, 0, 1, 6, 99, "")  '¤½¥q½LÂI-A­Ü½Õ¾ã
  28. ¯Srr(7) = Array("", 7, 7, 7, 1, 0, 1, 7, 99, "")  '½LÂIªí
  29. For i = 1 To UBound(S)
  30.    Set Rq1s = Srr(¯Srr(i)(3))(1, ¯Srr(i)(4))
  31.    Set Rq1n = Srr(¯Srr(i)(3))(Rs, ¯Srr(i)(4)).End(3)
  32.    Brr = Srr(¯Srr(i)(3)).Range(Rq1s, Rq1n)
  33.    
  34.    Set Rq2s = Srr(¯Srr(i)(7))(1, ¯Srr(i)(8))
  35.    Set Rq2n = Srr(¯Srr(i)(7))(Rq1n.Row, ¯Srr(i)(8))
  36.    Drr = Srr(¯Srr(i)(7)).Range(Rq2s, Rq2n)

  37.    Set Ras = Srr(¯Srr(i)(1))(1, ¯Srr(i)(2))
  38.    Set Ran = Srr(¯Srr(i)(1))(Rq1n.Row, ¯Srr(i)(2))
  39.    Crr = Srr(¯Srr(i)(1)).Range(Ras, Ran)
  40.    For x = 1 To UBound(Brr)
  41.       B = Brr(x, 1)
  42.       If InStr(Drr(x, 1), ¯Srr(i)(9)) Or Drr(x, 1) & ¯Srr(i)(9) = "" Then
  43.          Trr(i)(B) = Trr(i)(B) + Crr(x, 1)
  44.       End If
  45.    Next
  46. Next
  47. For i = 1 To Ac - 3
  48.    xR = Arr(i, 1)
  49.    Arr(i, 4) = Trr(7)(xR)
  50.    Arr(i, 5) = Trr(3)(xR)
  51.    Arr(i, 6) = Trr(1)(xR) + Trr(2)(xR)
  52.    Arr(i, 8) = Trr(5)(xR) + Trr(6)(xR)
  53.    If Trr(3)(xR) = 0 Then Arr(i, 5) = 0
  54.    If Trr(7)(xR) = 0 Then Arr(i, 4) = 0
  55.    If Trr(1)(xR) + Trr(2)(xR) = 0 Then Arr(i, 6) = 0
  56.    If Trr(5)(xR) + Trr(6)(xR) = 0 Then Arr(i, 8) = 0
  57.    Arr(i, 7) = Trr(5)(xR) + Trr(6)(xR) + Trr(1)(xR) + Trr(2)(xR) - Trr(3)(xR)
  58.    If Arr(i, 7) >= 0 Then Arr(i, 7) = 0
  59. Next i
  60. Sheets(S(0)).[A4].Resize(UBound(Arr), 8) = Arr
  61. MsgBox "¦@¯Ó®É¡G" & Timer - T & " ¬í"
  62. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD