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

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

¥»©«³Ì«á¥Ñ ymes ©ó 2023-2-9 16:57 ½s¿è

½d¨Ò¦p¤U¡G

========================
§c¡K¡K§ï¦¨³o¼Ë«á¡AÅܦ¨¨S¦³¦W³æ¡AµLªk°õ¦æ¡A¤§«e¬O§Ú²´ªá¶Ü¡K¡K

======================================
¦³®É·|¥X²{°»¿ù¡A¦³®É·|¥X²{¨S¦³¦W³æ¡AµLªk°õ¦æ

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

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

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-2-10 07:15 ½s¿è

¦^´_ 11# ymes


    «e½ú¦­¦w
101:¤@¦~¤@¯Z
102:¤@¦~¤G¯Z
~
201:¤G¦~¤@¯Z
202:¤G¦~¤G¯Z
~
~
501:¤­¦~¤@¯Z

¤£¬O³o³W«h¶Ü?
²{¦bªº½d¨Ò»P#5¼Óªº½d¨Ò¦³½Ä¬ð
¹ê»Úªº¦~¯Å¯Z¯Å¬O¤°»ò³W«h?
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¥»©«³Ì«á¥Ñ ymes ©ó 2023-2-10 08:42 ½s¿è

¦^´_ 12# Andy2483


¤£¦n·N«ä¡A³y¦¨±z§xÂZ¤F¡A

¾Ç®Õ³ø¦W¨t²Î¶]¥X¨Ó¸ê°T¬O¤@¦~¤@¯Z¡B¤@¦~¤G¯Z¡K¡K

¤@¡B­è¸Õ¤F¤@¤U¡A§ï¦¨¥H¤W¼Ë¦¡¡A60M·|¥X²{¿ù»~°T®§¡A¦ý100M¬O·|¶]¥X¥¿½Tµ²ªG


¤G¡B­ìªí®æ¼ÐÃD¬°¤k¤l100M¡A¦ý§ï¦¨100M¤k¥Í«á¡A·|¥X²{¤U¹Ï¿ù»~(¬O§Ú¤Ó§j¤ò¨D²«¡A¦ý·Q»¡¬°²Å¦XÄvÁɶµ¥Ø¡K)

2023-02-10_083530.png (41.53 KB)

2023-02-10_083530.png

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

TOP

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

¦^´_ 13# ymes


    ÁÂÁ«e½úÄ~Äò¤@°_¾Ç²ß°µ¬ã°Q¦^ÂÐ
³]Âù±ø¥óÀH¾÷¦W³æ¤£µ¥©ó¤½¥­,ªí®æ³°Äò¼W´î­×§ï¤£·|§xÂZ,³£¥u¯à¿ï¾Ü±µ¨ü
­×§ï»Ý¨D¦p¤U,½Ð«e½úÄ~Äò´ú¸Õ»Ý¨D,¦Û¤v­×§ï¬Ý¬Ý,ÁÂÁÂ

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

°õ¦æ«e:         ps:²M°£«áªºªí®æ­Y¬O8¶]¹D¼Æ,´Nºâ8¹D¦W³æ:­Y§R°£³Ñ6¶]¨ì,§Yºâ6¶]¹D¦W³æ,ÀH·N¼W´î


°õ¦æµ²ªG:
  1. Option Explicit
  2. Dim ²Õªí®æ As Range, R&, C%
  3. Sub ¶}©l¤À²Õ()
  4. Dim Drr, Brr, Crr, Y, ¶Ã¼Æ&, ¤H¼Æ&, ¹D¼Æ&, ²Õ¼Æ&, °õ¦æ¼Æ&, ¶]¹D¼Æ&, i&
  5. Dim ¶µ¥Ø$, Arr(1 To 1000, 1 To 3), n&, m&, ²Õ§O, xR As Range
  6. ¶µ¥Ø = Split(ActiveSheet.Name, "(")(0)
  7. ¶]¹D¼Æ = [A2].End(xlDown).Row - 2
  8. Drr = Range([³ø¦Wªí!C2], [³ø¦Wªí!A65536].End(3))
  9. For i = 1 To UBound(Drr)
  10.    If Drr(i, 3) Like ¶µ¥Ø & "*" Then
  11.       n = n + 1
  12.       Arr(n, 1) = Drr(i, 1): Arr(n, 2) = Drr(i, 2): Arr(n, 3) = Drr(i, 3)
  13.    End If
  14. Next
  15. If n = 0 Then
  16.    MsgBox "¨S¦³¦W³æ!µLªk°õ¦æ": Exit Sub
  17. End If
  18. If ¶]¹D¼Æ < 1 Then
  19.    MsgBox "¶]¹D¼Æ¤£²Å¦X³W«h!µLªk°õ¦æ": Exit Sub
  20. End If
  21. Call ²M°£: [L1].Resize(n, 3) = Arr
  22. ¤H¼Æ = n: ReDim Brr(¶]¹D¼Æ - 1, 1)
  23. Head:
  24. Set Y = CreateObject("Scripting.Dictionary")
  25. Do While °õ¦æ¼Æ < ¤H¼Æ
  26.    Randomize: ¶Ã¼Æ = Rnd() * 10000 Mod ¤H¼Æ + 1
  27.    If Y.Exists(¶Ã¼Æ) = Empty Then
  28.       °õ¦æ¼Æ = °õ¦æ¼Æ + 1
  29.       Y(¶Ã¼Æ) = ""
  30.       ¹D¼Æ = °õ¦æ¼Æ Mod ¶]¹D¼Æ
  31.       Y(Arr(¶Ã¼Æ, 1) & "|" & ¹D¼Æ) = ""
  32.       ²Õ¼Æ = IIf(¹D¼Æ, °õ¦æ¼Æ \ ¶]¹D¼Æ + 1, °õ¦æ¼Æ \ ¶]¹D¼Æ)
  33.       Y(Arr(¶Ã¼Æ, 1) & "/" & ²Õ¼Æ) = ""
  34.       Crr = Y(²Õ¼Æ & "/²Õ")
  35.       If Not IsArray(Crr) Then Crr = Brr
  36.       ¹D¼Æ = IIf(¹D¼Æ, ¹D¼Æ, ¶]¹D¼Æ)
  37.       Crr(¹D¼Æ - 1, 0) = Arr(¶Ã¼Æ, 1): Crr(¹D¼Æ - 1, 1) = Arr(¶Ã¼Æ, 2)
  38.       Y(²Õ¼Æ & "/²Õ") = Crr
  39.    End If
  40.    If (Y.Count - ²Õ¼Æ) Mod °õ¦æ¼Æ Then ²Õ¼Æ = 0: °õ¦æ¼Æ = 0: GoTo Head
  41. Loop
  42. For i = 1 To ²Õ¼Æ - 1: ²Õªí®æ.Copy Cells(i * (R + 1) + 1, 1): Next
  43. For i = 1 To ²Õ¼Æ
  44.    ²Õ§O = "(²Ä" & Application.Text(i, "[DBNum1]0") & "²Õ)"
  45.    Set xR = [B3].Item((i - 1) * (¶]¹D¼Æ + 3) + 1, 1)
  46.    xR.Resize(¶]¹D¼Æ, 2) = Y(i & "/²Õ")
  47.    Set xR = xR.Item(-1, 0)
  48.    xR.Value = Split(xR.Value, "(")(0) & ²Õ§O
  49. Next
  50. End Sub
  51. Sub ²M°£()
  52. Dim uR&
  53. R = [A2].End(xlDown).Row
  54. C = [A2].End(xlToRight).Column
  55. uR = ActiveSheet.UsedRange.Rows.Count
  56. [L:N].ClearContents
  57. [A2].End(xlDown).Item(2, 1).Resize(uR - R, C).Clear
  58. [B3].Resize(R - 2, 2).ClearContents
  59. Set ²Õªí®æ = Range([A1], Cells(R, C))
  60. End Sub
½Æ»s¥N½X
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¥»©«³Ì«á¥Ñ ymes ©ó 2023-2-10 13:16 ½s¿è

¦^´_ 14# Andy2483

·PÁ±zÀ°¦£¤£Â_§ï¶i¡AÅýªí³æ¯à´Â¦Û¤v©Ò´Á±æªº¥Ø¼ÐÁÚ¶i¡A¯à¦A°Ý¤@¤U¶Ü¡H

¤U¹Ï¤¤G3Àx¦s®æ¤¤¥ý¦æ³]©w¡GG3=IF(F3<>0,RANK(F3,$F$3:$F$10,1),"")¡A¦b¤À²Õ«á§Æ±æG14¯à¦Û°Ê¥Í¦¨¬°¡GG14=IF(F14<>0,RANK(F14,$F$14:$F$21,1),"")

§Æ±æ¯à¦A¦¸À°¦£¡A·PÁ¡I

2023-02-10_130435.png (99.04 KB)

2023-02-10_130435.png

2023-02-10_130435.png (99.04 KB)

2023-02-10_130435.png

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

TOP

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2023-2-10 14:42 ½s¿è

¦^´_ 15# ymes


    ÁÂÁ«e½ú,«á¾ÇÀrÆj§Þ½a¤F,½Ð«e½ú­Ì«ü¾É
¤£ª¾«e½ú§ï°Ê¦h¤Öµ{¦¡½X?

½Ð±N¤U¦C¬õ¦r·s¼W©Î¨ú¥N, ©Î ¤W¶Ç«e½ú³Ì·s½d¨Ò

Option Explicit
Dim ²Õªí®æ As Range, R&, C%
Sub ¶}©l¤À²Õ()
Dim Drr, Brr, Crr, Y, ¶Ã¼Æ&, ¤H¼Æ&, ¹D¼Æ&, ²Õ¼Æ&, °õ¦æ¼Æ&, ¶]¹D¼Æ&, i&
Dim ¶µ¥Ø$, Arr(1 To 1000, 1 To 3), n&, ²Õ§O, xR As Range
¶µ¥Ø = Split(ActiveSheet.Name, "(")(0)
¶]¹D¼Æ = [A2].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
Next
If n = 0 Then
   MsgBox "¨S¦³¦W³æ!µLªk°õ¦æ": Exit Sub
End If
If ¶]¹D¼Æ < 1 Then
   MsgBox "¶]¹D¼Æ¤£²Å¦X³W«h!µLªk°õ¦æ": Exit Sub
End If
Call ²M°£: [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
      ¹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
Loop
'For i = 1 To ²Õ¼Æ - 1: ²Õªí®æ.Copy Cells(i * (R + 1) + 1, 1): Next '³o¦æÂI±¼,·s¼W¤U¦C¬õ¦r
Dim S$, T&
For i = 1 To ²Õ¼Æ - 1
   ²Õªí®æ.Copy Cells(i * (R + 1) + 1, 1)
   T = 3 + ((R + 1) * i)
   S = "=IF(F" & T & "<>0,RANK(F" & T & ",$F$" & T & ":$F$" & T + ¶]¹D¼Æ - 1 & ",1),"""")"
   Cells(i * (R + 1) + 1, 1).Item(3, 7).Resize(¶]¹D¼Æ, 1) = S
Next

For i = 1 To ²Õ¼Æ
   ²Õ§O = "(²Ä" & Application.Text(i, "[DBNum1]0") & "²Õ)"
   Set xR = [B3].Item((i - 1) * (¶]¹D¼Æ + 3) + 1, 1)
   xR.Resize(¶]¹D¼Æ, 2) = Y(i & "/²Õ")
   Set xR = xR.Item(-1, 0)
   xR.Value = Split(xR.Value, "(")(0) & ²Õ§O
Next
End Sub
Sub ²M°£()
Dim uR&
R = [A2].End(xlDown).Row
C = [A2].End(xlToRight).Column
uR = ActiveSheet.UsedRange.Rows.Count
[L:N].ClearContents
[A2].End(xlDown).Item(2, 1).Resize(uR - R, C).Clear
[B3].Resize(R - 2, 2).ClearContents
'·s¼W¤U¦C¬õ¦r
[F3].Resize(R - 2, 1).ClearContents
[G3].Resize(R - 2, 1) = "=IF(F3<>0,RANK(F3,$F$3:$F$" & R & ",1),"""")"

Set ²Õªí®æ = Range([A1], Cells(R, C))
End Sub
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

¥»©«³Ì«á¥Ñ ­ã´£³¡ªL ©ó 2023-2-10 15:56 ½s¿è

¤½¦¡+±Æ§Ç+vba//
Xl0000208-1.rar (35.24 KB)

­Y¥¼¥Xµ²ªG..¦A¸Õ´X¦¸..­Y³£¸Õ¤£¥X¨Ó, ¥i¯à¸ê®Æµ²ºcµLªk°µ¥X¤À²Õ(¦P¤@¯Z¤£¯à¦P¹D, ¬O¹DÃö¥d)~~

__§ó¥¿:³Ì«á¤@²Õ¥i¯à¥¼º¡¤H¼Æ, ¹D¦¸·|¦³»~®t, ¥HªÅ®æ¶ñ¤J
      ³Ì«á¤@²Õ¤H¼Æ¤£¨¬®É, ¤£·|¥Ñ1~?¶¶§Ç±Æ¦C, ·|¦³¶¡¹j

TOP

¦^´_ 17# ­ã´£³¡ªL


    ÁÂÁ«e½ú«ü¾É,«á¾Ç¬ã¨s¤@¤U
¥Î¦æ°Ê¸Ë¸mÂsÄý½×¾Â¾Ç²ß«Ü¤è«K,ÁÂÁ½׾¸gÀç¹Î¶¤
½Ð¤j®a¤@°_¤W½×¾Â¨Ó¥æ¬y

TOP

§ï¤U//³Ì«á¤@²ÕµL¶¡¹j//
Xl0000208-2.rar (39.29 KB)

TOP

¦^´_ 16# Andy2483


¤£¦n·N«ä¡A¦]¬°¯uªº¤£À´vba¡A©Ò¥H¥i¯à°Ê¤F¨Ç¦Û¥H¬°¬Oªº¦a¤è¡A¥i¯àÅý±z§xÂZ¡A»¡Án©êºp¤F¡I

ÁöµM  ­ã´£³¡ªL¤j¤j»¡¥Î¤½¦¡+vba¥i¸Ñ¨M¥H¤U§xÂZ¡A¦ýÁÙ·Q»¡°Ý°Ý¬Ý¡G

¤@¡B­ì¥»A:CÄæ¤À§O¬°¯Z¯Å¡B©m¦W¡B¶µ¥Ø¡A·Q§ï¦¨¨úA:DÄæ¡A¤À§O¬°¶µ¥Ø¡B¯Z¯Å¡B©m¦W¡B¾Ç¸¹¡A­n«ç»ò§ï°Ê©O¡H

¤G¡B¥i¥H°µ­Ó¤À²Õ¶s¡AÅý¤@Á䧹¦¨ÀH¾÷¤À²Õ¶Ü¡H³o¼Ë´N¤£¥Î¨ì¦U¤À­¶¤@¤@¥h«ö¤À²Õ¶s¤F

¤T¡B¦U³æ¶µÄvÁÉL:NÄæ­ì¥»¦³ÅçÃÒ¸ê°T¡A¥i¥H¹³ ­ã´£³¡ªL¤j¤j¯ë¡A¥[¤W¤À°tªº²Õ§O¤Î¹D¦¸¶Ü¡H

¦A¦¸°J¤ß·PÁ±zªºÀ°¦£¡I

¹B°Ê·|¤À²Õªí20230210-1.zip (58.64 KB)

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

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¯Ê¤fªºªM¤l¡A¦pªG´«¤@­Ó¨¤«×¬Ý¥¦¡A¥¦¤´µM¬O¶êªº¡C
ªð¦^¦Cªí ¤W¤@¥DÃD