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

[µo°Ý] Aªí¨C³æµ§¸ê®Æ¥h¬d¸ßBªí ±o¥X¦h¦C¸ê®Æ ½Æ»s¨ìCªí [0613]¦¨¥\ÂP

¦^´_ 1# milkpillow

     http://gb.twbts.com/index.php?topic=12801.0
    ¥DÃD: sheet2¤º®e©T©w,¤ñ¹ïsheet1«á,±N²Å¦Xªº¦C½Æ»s©ósheet3  

  Hsiehª©¥D   Re: sheet2¤º®e©T©w,¤ñ¹ïsheet1«á,±N²Å¦Xªº¦C½Æ»s©ósheet3
« ¦^ÂФ峹 #9 ©ó: 2010-02-28, 18:07:56 »  
µ{¦¡½X:
Sub nn()
Dim Rng As Range, A As Range, Cell As Range
With Sheet2
Set Rng = .Range(.[A1], .[A65536].End(xlUp))'³]¸m¤ñ¹ïªº¼Ð·Ç°Ï°ì
End With
With Sheet1
For Each A In .Range(.[D1], .[D65536].End(xlUp))'¦bsheet1ªºdÄæ¸ê®Æ´`Àô
¡@¡@If Not Rng.Find(A, lookat:=xlWhole) Is Nothing Then'¦pªG¼Ð·Ç°Ï§ä¨ìdÄ檺­È
¡@¡@¡@ If Cell Is Nothing Then Set Cell = A Else Set Cell = Union(Cell, A)'¦pªGÅܼÆCell¬O¤£¬Oª«¥ó´N±NdÄæ³]µ¹Cell§_«hCell´N·|±N­ì¨Ó½d³ò¼W¥[¤@Àx¦s®æA
¡@¡@End If
Next
End With
Sheet3.Cells = ""'²MªÅSheet3¤º®e
Cell.EntireRow.Copy Sheet3.[A1]'§âSheet1²Å¦Xªº¦C½Æ»s¨ìSheet3ªºA1
¡@¡@¡@
End Sub

TOP

        ÀR«ä¦Û¦b : ºw¤ô¦¨ªe¡C²É¦Ì¦¨ÅÚ¡A¤Å»´¤vÆF¡A¤Å¥Hµ½¤p¦Ó¤£¬°¡C
ªð¦^¦Cªí ¤W¤@¥DÃD