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

[µo°Ý] ¹B°Ê·|ÄvÁɹD¦¸ÀH¾÷¤À²Õ

¦A¦¸·PÁ¡A¦ý«Ü©êºp¡A¦b¤U¹ï¥¨¶°¤@Äw²ö®i¡AÅý§Ú¹L¥÷¤@ÂI¡A¦A°Ý¤@¨Ç°ÝÃD¡G

¤@¡B¦pªG­n·s¼W¨ä¥L¶µ¥Ø(¦p200M¡B800M¡K¡K¬Æ¦Ü¬O¨k¥Í²Õ)¡A­n«ç»ò§ï°Ñ¼Æ©O¡H

¤G¡B³ø¦Wªí¬OÁ`ªí¡A¦pªG­n§ï¦¨¤G¦~¯Åªº¾Ç¥ÍÀË¿ýªí¡A¤S­n«ç»ò§ï©O¡H

¦A¦¸´£°Ý¡A§Æ±æ¯àµ¹¤©¸Ñµª¡A·P¿E¤£ºÉ

¹B°Ê·|¤À²Õªí_20230208.zip (65.48 KB)

~¬Q¤éºØºØ¡AÄ´¦p¬Q¤é¦º~
~¤µ¤éºØºØ¡AÄ´¦p¤µ¤é¥Í~

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-2-8 09:52 ½s¿è

¦^´_ 3# ymes


    ÁÂÁ«e½ú¦^´_
­×§ï¤è®×¦p¤U,½Ð«e½ú¸Õ¸Õ¬Ý

¹B°Ê·|¤À²Õªí_20230208.zip (40.87 KB)

°õ¦æ«e:


°õ¦æµ²ªG:



Option Explicit
Sub TEST_1()
Dim Drr, Brr, Crr, Y, ¶Ã¼Æ&, ¤H¼Æ&, ¹D¼Æ&, ²Õ¼Æ&, °õ¦æ¼Æ&, ¶]¹D¼Æ&, i&
Dim ¶µ¥Ø$, Arr(1 To 1000, 1 To 3), n&, m&
¶µ¥Ø = Split(ActiveSheet.Name, "(")(0)
¶]¹D¼Æ = [A3].End(xlDown).Row - 2
Drr = Range([³ø¦Wªí!C2], [³ø¦Wªí!A65536].End(3))
For i = 1 To UBound(Drr)
   If Drr(i, 3) Like ¶µ¥Ø & "*" Then
      n = n + 1
      Arr(n, 1) = Drr(i, 1): Arr(n, 2) = Drr(i, 2): Arr(n, 3) = Drr(i, 3)
   End If
   If InStr(Cells(i, 1), ¶µ¥Ø) Then Cells(i, 2).Resize(1, 2).ClearContents: m = m + 1
Next
If n = 0 Or m < n Then MsgBox "µLªk°õ¦æ": Exit Sub
[L:N].ClearContents: [L1].Resize(n, 3) = Arr
¤H¼Æ = n: ReDim Brr(¶]¹D¼Æ - 1, 1)
Head:
Set Y = CreateObject("Scripting.Dictionary")
Do While °õ¦æ¼Æ < ¤H¼Æ
   Randomize: ¶Ã¼Æ = Rnd() * 10000 Mod ¤H¼Æ + 1
   If Y.Exists(¶Ã¼Æ) = Empty Then
      °õ¦æ¼Æ = °õ¦æ¼Æ + 1
      Y(¶Ã¼Æ) = ""
      ¹D¼Æ = °õ¦æ¼Æ Mod ¶]¹D¼Æ
      Y(Arr(¶Ã¼Æ, 1) & "|" & ¹D¼Æ) = ""
      ²Õ¼Æ = IIf(¹D¼Æ, °õ¦æ¼Æ \ ¶]¹D¼Æ + 1, °õ¦æ¼Æ \ ¶]¹D¼Æ)
      Y(Arr(¶Ã¼Æ, 1) & "/" & ²Õ¼Æ) = ""
      Crr = Y(²Õ¼Æ & "/²Õ")
      If Not IsArray(Crr) Then
         Crr = Brr
      End If
      ¹D¼Æ = IIf(¹D¼Æ, ¹D¼Æ, ¶]¹D¼Æ)
      Crr(¹D¼Æ - 1, 0) = Arr(¶Ã¼Æ, 1): Crr(¹D¼Æ - 1, 1) = Arr(¶Ã¼Æ, 2)
      Y(²Õ¼Æ & "/²Õ") = Crr
   End If
   If (Y.Count - ²Õ¼Æ) Mod °õ¦æ¼Æ Then
      ²Õ¼Æ = 0
      °õ¦æ¼Æ = 0
      GoTo Head
   End If
Loop
For i = 1 To ²Õ¼Æ
   [B3].Item((i - 1) * (¶]¹D¼Æ + 3) + 1, 1).Resize(¶]¹D¼Æ, 2) = Y(i & "/²Õ")
Next
End Sub
Sub ²M°£()
Dim ¶µ¥Ø$, i&
¶µ¥Ø = Split(ActiveSheet.Name, "(")(0)
For i = 1 To [³ø¦Wªí!A65536].End(3)
   If InStr(Cells(i, 1), ¶µ¥Ø) Then Cells(i, 2).Resize(1, 2).ClearContents
Next
[L:N].ClearContents
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¦^´_ 2# Andy2483


±z¤Ó«È®ð¤F¡A´ú¸Õ¤F¤@°}¤l¡A¥i¥H¥Î¡A¦Ó¥B«D±`²Å¦X¦b¤U»Ý¨D¡A¦ý¡K¡K

¥¨¶°¯uªº¤£¼ô¡A¤é«á¯uªº­n­×§ï¤ñ¸û§xÃø¡A­É°Ý¤@¤U¡G

¤@¡B­Y¶]¹D¬°¤K­Ó¶]¹D¡A­n¦p¦ó­×§ï©O¡H

¤G¡B­Y¦³¨ä¥LÄvÁɶµ¥Ø¤]­nÀH¾÷¤À²Õ¡A¤S­n¦p¦ó­×§ï©O¡H

¥i¥Hªº¸Ü¡A¦A³Ò·ÐÀ°¦£·Q¤@¤U¡A·PÁ¡I

¹B°Ê·|¤À²Õªí¤G.zip (16.18 KB)

~¬Q¤éºØºØ¡AÄ´¦p¬Q¤é¦º~
~¤µ¤éºØºØ¡AÄ´¦p¤µ¤é¥Í~

TOP

¦^´_ 1# ymes


    ÁÂÁ«e½úµoªí¦¹¥DÃD»P½d¨Ò
«á¾Ç¾Ç²ß«á«Øij¤è®×¦p¤U,½Ð«e½ú¸Õ¸Õ¬Ý

¹B°Ê·|¤À²Õªí_20230207.zip (22.68 KB)

°õ¦æ«e:


°õ¦æ1:


°õ¦æ2:


Option Explicit
Sub TEST_1()
Dim Arr, Brr, Crr, Y, ¶Ã¼Æ&, ¤H¼Æ&, ¹D¼Æ&, ²Õ¼Æ&, ¶µ¼Æ&, ¶]¹D¼Æ&, i&
Arr = Range([³ø¦Wªí!B2], [³ø¦Wªí!A65536].End(3))
¤H¼Æ = UBound(Arr): ¶]¹D¼Æ = 6: ReDim Brr(¶]¹D¼Æ - 1, 1)
Head:
Set Y = CreateObject("Scripting.Dictionary")
Do While ¶µ¼Æ < ¤H¼Æ
   Randomize: ¶Ã¼Æ = Rnd() * 10000 Mod ¤H¼Æ + 1
   If Y.Exists(¶Ã¼Æ) = Empty Then
      ¶µ¼Æ = ¶µ¼Æ + 1
      Y(¶Ã¼Æ) = ""
      ¹D¼Æ = ¶µ¼Æ Mod ¶]¹D¼Æ
      Y(Arr(¶Ã¼Æ, 1) & "|" & ¹D¼Æ) = ""
      ²Õ¼Æ = IIf(¹D¼Æ, ¶µ¼Æ \ ¶]¹D¼Æ + 1, ¶µ¼Æ \ ¶]¹D¼Æ)
      Y(Arr(¶Ã¼Æ, 1) & "/" & ²Õ¼Æ) = ""
      Crr = Y(²Õ¼Æ & "/²Õ")
      If Not IsArray(Crr) Then
         Crr = Brr
      End If
      ¹D¼Æ = IIf(¹D¼Æ, ¹D¼Æ, ¶]¹D¼Æ)
      Crr(¹D¼Æ - 1, 0) = Arr(¶Ã¼Æ, 1): Crr(¹D¼Æ - 1, 1) = Arr(¶Ã¼Æ, 2)
      Y(²Õ¼Æ & "/²Õ") = Crr
   End If
   If (Y.Count - ²Õ¼Æ) Mod ¶µ¼Æ Then
      ²Õ¼Æ = 0
      ¶µ¼Æ = 0
      GoTo Head
   End If
Loop
With Sheets("¤À²Õªí")
   For i = 1 To ²Õ¼Æ
      .[B3].Item((i - 1) * 9 + 1, 1).Resize(¶]¹D¼Æ, 2) = Y(i & "/²Õ")
   Next
End With
Set Arr = Nothing
Set Brr = Nothing
Set Crr = Nothing
Set Y = Nothing
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

        ÀR«ä¦Û¦b : ¦³´¼¼z¤~¯à¤À¿ëµ½´c¨¸¥¿¡F¦³Á¾µê¤~¯à«Ø¥ß¬üº¡¤H¥Í¡C
ªð¦^¦Cªí ¤W¤@¥DÃD