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

µ{¦¡½X³t«×°ÝÃD

µ{¦¡½X³t«×°ÝÃD

·s¤â½Ð¯q¦U¦ì¡A¤U¦Cµ{¦¡½X¦b³ÌÀˬd½Æ´ú¸ê®Æ°µ§R°£®É¡A¹B¦æ®É¶¡¸û¤[¡A¥i¥H«ç»ò­×§ïµ{¦¡¡AÅý³t«×ÅܧÖ

Sub ½Æ»s()
    Sheets("¶W³W").Select
    Range("A3:V3").Select
    Range(Selection, Selection.End(xlDown)).Select
    Selection.Copy
    Sheets("°e´ú").Select
    i = Sheets("°e´ú").Columns("A:A").Find("*", LookIn:=xlValues, LOOKAT:=xlWhole, SearchDirection:=xlPrevious).Row + 1
    Range("A" & i).Select
    Selection.PasteSpecial Paste:=xlPasteValues, Operation:=xlNone, SkipBlanks _
    :=False, Transpose:=False
    For j = Sheets("°e´ú").Columns("B:B").Find("*", LookIn:=xlValues, LOOKAT:=xlWhole, SearchDirection:=xlPrevious).Row To 2 Step -1
    If Cells(j, 2) <> "½Æ´ú" Then
    Rows(j).Delete
    End If
    Next
End Sub

¥»©«³Ì«á¥Ñ Andy2483 ©ó 2024-12-3 11:05 ½s¿è

¦^´_ 1# cyfchuang


    ÁÂÁ«e½úµoªí¦¹¥DÃD,«á¾Ç¾Ç²ß¤è®×¦p¤U,½Ð«e½ú°Ñ¦Ò

Sub TEST()
Dim Arr, i&, N&, j%
'¡ô«Å§iÅܼÆ:Arr¬O³q¥Î«¬ÅܼÆ,(i,N)ªø¾ã¼Æ,jµu¾ã¼Æ
With Sheets("¶W³W")
'¡ô¥H¤U¬OÃö©ó "¶W³W"¤u§@ªíªºµ{§Ç
   Arr = .[A3].Resize(.UsedRange.Rows.Count, 22)
   '¡ô¥OArr³o³q¥Î«¬ÅܼƬO¤Gºû°}¦C,¥HA3Àx¦s®æÂX®i¦V¤U¾ãªí¤w¨Ï¥Î¦C¼Æ,
   '¦V¥k22Ädªº½d³òÀx¦s®æ­È±a¤J¦¹°}¦C¤¤

End With
For i = 1 To UBound(Arr)
'¡ô³]¶¶°j°éi±q1 °õ¦æ¨ìArr°}¦CÁa¦V³Ì¤j¯Á¤Þ¦C¸¹
   If Trim(Arr(i, 2)) = "½Æ´ú" Then
   '¡ô¦pªGi¦CÄ檺Arr°}¦C­È¥h°£ÀY§ÀªÅ¥Õ¦r¤¸«á ¬O "½Æ´ú"?
      N = N + 1
      '¡ôif±ø¥ó¦¨¥ß´N¥ON³oªø¾ã¼ÆÅܼƲ֥[1
      For j = 1 To 22
      '¡ô³]¶¶°j°éj±q1 °õ¦æ¨ì 22
         Arr(N, j) = Arr(i, j)
         '¡ô¥O²Å¦X±ø¥óªº¸Ó¦C,¨ä°}¦C­È³vÄæÂл\¨ìArr°}¦CNÅܼƦC
      Next
   End If
Next
If N = 0 Then Exit Sub
'¡ô¦pªG¨S¦³²Å¦X±ø¥óªº±¡ªp!´Nª½±µµ²§ôµ{§Ç°õ¦æ
With Sheets("°e´ú")
'¡ô¥H¤U¬OÃö©ó "°e´ú"¤u§@ªíªºµ{§Ç
   .Cells(Rows.Count, "B").End(3)(2, 0).Resize(N, UBound(Arr, 2)) = Arr
   '¡ô¥OBÄæ³Ì«á¦³¤º®eÀx¦s®æªº¤U1¦C/¥ª1®æÀx¦s®æ¶}©l ¦V¤UNÅܼƦC,
   '¦V¥kArr°}¦C¾î¦V³Ì¤j¯Á¤ÞÄ渹¼Æ ©Ò¦J¦CªºÀx¦s®æ¥HArr°}¦C­È¼g¤J

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

TOP

¦^´_ 2# Andy2483

ÁÂÁ¡AÅܱo¶W§Öªº

ªøª¾ÃѤF¡A¾Ç²ß¤¤

TOP

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