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

[µo°Ý] «ü©w¸¹½X¦b°¸¼ÆÄ檺Á`­Ó¼Æ¤Î©_¼ÆÄ檺Á`¦¸¼Æ

¦^´_  samwang
·PÁ±zªº«ü¾É^^



¤£¦n·N«ä¡A"·s¼W»Ý¨D"ªºµ{¦¡½X~§Ú©ñ¸mªº¦ì¦C~¤£ª¾¹D¬O­þ¸Ì¦³»~¸m ...
ziv976688 µoªí©ó 2021-8-22 10:28



¤£¦n·N«ä¡AArr¨Ó·½ªº¸ê®Æb¡Be­n¹ï½Õ¤@¤U§Y¥i¡AÁÂÁÂ
Arr = .Range(.[e2], .[b65536].End(3))

TOP

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

¦^´_ 10# samwang
·PÁ±zªº«ü¾É^^


TEST_0822_s1.rar (24.92 KB)
¤£¦n·N«ä¡A"·s¼W»Ý¨D"ªºµ{¦¡½X~§Ú©ñ¸mªº¦ì¦C~¤£ª¾¹D¬O­þ¸Ì¦³»~¸m?
©Ò¥H¦b¦C47·|²£¥Í°»¿ù^^"
If Arr(i, 3) > 0 Then Arr(i, 4) = Arr(i, 3) / Arr(i, 2)
©|½Ð³Ò¾r±z½ç¥¿¡CÁÂÁ±z!

Private Sub CommandButton1_Click()
Dim Arr, Brr(1 To 7), Crr, xD, T%, i&, j&
    Nrange = "1878" ' InputBox("½Ð¿é¤JDATA!ªº¶}¼ú´Á¼Æ", "¿é¤J´Á¼Æ")
    Tm = Timer
    [L1] = ""
    Application.DisplayAlerts = False
   
    Set xD = CreateObject("Scripting.Dictionary")
With Sheets("Sheet1")
        .[A1] = Nrange
        T = .[A1]
        Arr = Range([DATA!h1], [DATA!a65536].End(3))
        For i = 2 To UBound(Arr)
         If Arr(i, 1) = T Then
          For j = 2 To 8: n = n + 1: Brr(n) = Arr(i, j): Next
         End If
        Next

       .[A2] = ((.Cells(1, 256).End(xlToLeft).Column - 12) / 2) & "­Ó"
       .[A3] = "¶}¼ú¸¹½X"
       .[A4].Resize(7) = Application.Transpose(Brr)


          For i = 1 To 49   'BÄæ
          .Range("B" & i + 1) = i
          Next
  
        R = .Columns("M:DF").Find("*", , , , , 2).Row
        Arr = .Range("M1:DF" & R)
      For j = 1 To UBound(Arr, 2) Step 2
       For i = 2 To UBound(Arr)
        T = Arr(i, j): If T = 0 Then GoTo 98
        xD(T & "/1") = xD(T & "/1") + 1
        xD(T & "/2") = xD(T & "/2") + Arr(i, j + 1)
       Next i
98:   Next j
       Arr = .Range(.[C1], .[B65536].End(3))
     For i = 2 To UBound(Arr)
      For j = 1 To 2: Arr(i - 1, j) = xD(Arr(i, 1) & "/" & j): Next
      If xD(Arr(i, 1) & "/1") = "" Then Arr(i - 1, 1) = 0: Arr(i - 1, 2) = 0 '­n·s¼W
     Next
     .[C2].Resize(UBound(Arr) - 1, 2) = Arr  'C&DÄæ

Arr = .Range(.[B2], .[e65536].End(3))
ReDim Crr(1 To UBound(Arr), 1 To 5)
For i = 1 To UBound(Arr)
    If Arr(i, 3) > 0 Then Arr(i, 4) = Arr(i, 3) / Arr(i, 2)
    Crr(i, 1) = Arr(i, 2): Crr(i, 2) = Arr(i, 2)
    Crr(i, 3) = Arr(i, 1): Crr(i, 4) = Arr(i, 3)
    Crr(i, 5) = Arr(i, 4)
Next
.[B2].Resize(UBound(Arr), 4) = Arr
With .Range("g2").Resize(UBound(Crr), 5)
    .Value = Crr
    .Sort key1:=.Item(1), Order1:=2, Header:=xlNo
    Crr = .Value
End With
T = Application.Max(.Range("g2:g" & UBound(Crr)))
For i = 1 To UBound(Crr)
    Crr(i, 1) = T - Crr(i, 1) + 1
Next
.[H2].Resize(UBound(Crr), 1) = Crr


'ª©­±®æ¦¡.........................................................
            With .Columns("A:DF")
                .Font.Name = "Verdana"  '¦rÅé
                .HorizontalAlignment = xlCenter  '¥ª¥k¸m¤¤
                .VerticalAlignment = xlCenter  '¤W¤U¸m¤¤
                .EntireColumn.AutoFit  '¦Û°ÊÄæ¼e
                .EntireRow.AutoFit  '¦Û°Ê¦C°ª
            End With
    End With




        Sheets("Sheet1").Copy
        ActiveWorkbook.SaveAs ThisWorkbook.Path & "\7C_0_" & Nrange & "´Á_" & Sheets("Sheet1").[A2] & ".xls"
        ActiveWindow.Close
    Application.Goto [DATA!J1]
[L1] = Nrange & "=" & Format((Timer - Tm) / 24 / 60 / 60, "hh:mm:ss")
End Sub

TOP

¦^´_ 9# ziv976688

½Ð¦Û¦æ·s¼W¦p¤U¡A¦]¬°·íµL¸ê®Æ¸É¤W0¡AÁÂÁÂ
   
For i = 2 To UBound(Arr)
      For j = 1 To 2: Arr(i - 1, j) = xD(Arr(i, 1) & "/" & j): Next
      If xD(Arr(i, 1) & "/1") = "" Then Arr(i - 1, 1) = 0: Arr(i - 1, 2) = 0 '­n·s¼W
Next
  .[C2].Resize(UBound(Arr) - 1, 2) = Arr  'C&DÄæ

Â^¨ú.PNG (118.25 KB)

Â^¨ú.PNG

TOP

¦^´_  ML089
¦^´_  samwang


¤U¦C·s¼W»Ý¨Dªº»yªk~Àµ½Ð¤G¦ì¤j¤jÄ~Äò½ç±Ð¡CÁÂÁ !
.[A2] = ((M1F1) ...
ziv976688 µoªí©ó 2021-8-22 01:47

½Ð´ú¸Õ¬Ý¬Ý¡AÁÂÁÂ
Sub test()
Dim Arr, Brr(1 To 7), Crr, xD, T%, i&, j&
Set xD = CreateObject("Scripting.Dictionary")
With Sheets("Sheet1")
T = .[A1]
Arr = Range([DATA!h1], [DATA!a65536].End(3))
For i = 2 To UBound(Arr)
    If Arr(i, 1) = T Then
        For j = 2 To 8: n = n + 1: Brr(n) = Arr(i, j): Next
    End If
Next
.[A4].Resize(7) = Application.Transpose(Brr)
.[A2] = (.Cells(1, 256).End(xlToLeft).Column - 12) / 2
Arr = .Range(.[B2], .[e65536].End(3))
ReDim Crr(1 To UBound(Arr), 1 To 5)
For i = 1 To UBound(Arr)
    If Arr(i, 3) > 0 Then Arr(i, 4) = Arr(i, 3) / Arr(i, 2)
    Crr(i, 1) = Arr(i, 2): Crr(i, 2) = Arr(i, 2)
    Crr(i, 3) = Arr(i, 1): Crr(i, 4) = Arr(i, 3)
    Crr(i, 5) = Arr(i, 4)
Next
.[B2].Resize(UBound(Arr), 4) = Arr
With Range("g2").Resize(UBound(Crr), 5)
    .Value = Crr
    .Sort key1:=.Item(1), Order1:=2, Header:=xlNo
    Crr = .Value
End With
T = Application.Max(.Range("g2:g" & UBound(Crr)))
For i = 1 To UBound(Crr)
    Crr(i, 1) = T - Crr(i, 1) + 1
Next
[H2].Resize(UBound(Crr), 1) = Crr
End With
End Sub

TOP

¦^´_ 2# ML089
¦^´_ 3# samwang
TEST_0822.rar (31.76 KB)

¤U¦C·s¼W»Ý¨Dªº»yªk~Àµ½Ð¤G¦ì¤j¤jÄ~Äò½ç±Ð¡CÁÂÁ !
.[A2] = ((M1:DF1)<>""ªºÄæ¼Æ)/2 & "­Ó"   '¦C10
.[A4:A10] =·íA$1<>""®É¡A«hÅã¥ÜDATA!AÄæ=A$1´Á¼Æ¤§B:H¸¹½X   '¦C12

'¦C32¥H¤U
.[E2:E50] =·íD2>0®É¡A«hÅã¥ÜD2/C2¤§­È¡C   
.[G2:G50] =.[C2:C50]ªº­È~¥Ñ¤j¦Ó¤p¨Ì§Ç©¹¤U±Æ¦C¡C
.[H2:H50] =±N.[G2:G50] <>""ªº±Æ¦W(¥i­«½Æ)¨Ì§Ç©¹¤U±Æ¦C¡C
.[I2:I50] =·í.[G2:G50]¤¤<>""ªº¬Y­È=.[C2:C50]ªº¬Y­È®É¡A«hÅã¥Ü.[C2:C50]ªº¸Ó¬Y­È¦P¦CªºBÄæ­È¡C  
.[J2:J50] =·í.[I2:I50]¤¤ªº¬Y­È=.[B2:B50]ªº¬Y­È®É¡A«hÅã¥Ü.[B2:B50]ªº¸Ó¬Y­È¦P¦CªºDÄæ­È¡C  
.[K2:K50] =·í.[I2:I50]¤¤ªº¬Y­È=.[B2:B50]ªº¬Y­È®É¡A«hÅã¥Ü.[B2:B50]ªº¸Ó¬Y­È¦P¦CªºEÄæ­È¡C

TOP

¦^´_ 7# samwang
¤£¦n·N«ä~§Ú²¨©¿¤F
ÁÂÁ±z

TOP

¦^´_ 6# ziv976688


§AªºBÄ檺¼Æ¦r1~49 ¤£¨£¤F¡A©Ò¥H¾É­P¨º­Ó°ÝÃD¡AÁÂÁÂ

TOP

¦^´_ 3# samwang
S¤j¤j:±z¦n!
¤£¦n·N«ä~¦³ÂI¤p°ÝÃD~·q½Ð½ç¥¿~ÁÂÁÂ

TEST_1.rar (15.61 KB)

TOP

¦^´_ 3# samwang
S¤j¤j:
ÁÂÁ±zªº«ü¾É©MÀ°¦£~·P®¦

TOP

¦^´_ 2# ML089
ª©¥D¤j¤j:
ÁÂÁ±zªº«ü¾É©MÀ°¦£~·P®¦

TOP

        ÀR«ä¦Û¦b : ¨ü¤HÂI¤ô¤§®¦¡A¶··í´é¬u¥H³ø¡C
ªð¦^¦Cªí ¤W¤@¥DÃD