- ©«¤l
- 1180
- ¥DÃD
- 204
- ºëµØ
- 0
- ¿n¤À
- 1051
- ÂI¦W
- 0
- §@·~¨t²Î
- Mac.OS10.6
- ³nÅ骩¥»
- Office 2003
- ¾\ŪÅv
- 100
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2010-5-3
- ³Ì«áµn¿ý
- 2012-9-19
     
|
¦^´_ 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 |
|