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

¦P¼Ë¥¨¶°¥t¤@Àɮ׫o°õ¦æ¿ù»~

¦P¼Ë¥¨¶°¥t¤@Àɮ׫o°õ¦æ¿ù»~

¥»©«³Ì«á¥Ñ ycchenzd ©ó 2010-8-5 22:02 ½s¿è

¤p§Ì¤§«e¦b½׾µo°Ýªº ¤@­Ó°ÝÃD
http://gb.twbts.com/index.php?topic=12801.0

sheet1¤º®e¤£©T©w,¦ý·|¨Ì¦¹±Æ§Ç
sheet2¤º®e©T©w,¤ñ¹ïsheet1«á,±N²Å¦Xªº¦C½Æ»s©ósheet3
sheet3¬°µ²ªG

¨Ï¥Î¤U¦Cµ{¦¡½X
Sub nn()
Dim Rng As Range, A As Range, Cell As Range
With Sheet2
Set Rng = .Range(.[A1], .[A65536].End(xlUp))
End With
With Sheet1
For Each A In .Range(.[D1], .[D65536].End(xlUp))
¡@¡@If Not Rng.Find(A, lookat:=xlWhole) Is Nothing Then
¡@¡@¡@ If Cell Is Nothing Then Set Cell = A Else Set Cell = Union(Cell, A)
¡@¡@End If
Next
End With
Sheet3.Cells = ""
Cell.EntireRow.Copy Sheet3.[A1]¡@¡@¡@
End Sub

¦ý¬O¦b­ì¥»ÀÉ®×°õ¦æok,
­n¦b¥t¤@­Ó¥H¸ê®Æ®w§ì¨ú«áªº¸ê®ÆÀÉ°õ¦æ®É«o·|¦bCell.EntireRow.Copy Sheet3.[A1]¡@¥X²{¿ù»~
Ãþ¦üClass copy ªº¤èªk¿ù»~,
¦ý¬O°õ¦æ«áªº¸ê®Æ¬O¥¿½Tªº
¤£ª¾°ÝÃD¥X¦b­þ¸Ì,¸ê®Æ¤º®e¬O¤@¼Ëªº°Ú
Àµ½Ð¸Ñµª

·|¬O¸òÄæ¦ì®æ¦¡¦³Ãö¶Ü?

¤w¸É¤WÀÉ®×

book1.zip (52.51 KB)

¦^´_ 1# ycchenzd
¨S¦³¿ù»~µo¥Í°Ú?
½ÐªþÀɤW¨Ó¬Ý¬Ý

TOP

¤w¸É¤WÀÉ®×
¥X²{ªº¿ù»~¬OClass Range ªºCopy¤èªk¥¢±Ñ
Àµ½Ð¸Ñµª..ÁÂÁÂ..

TOP

¥H§A¤W¶ÇªºÀÉ®×´ú¸Õ¨Ã¥¼²£¥Í¿ù»~
¥[­Ó§PÂ_¦¡¸Õ¸Õ¬Ý
If Not Cell Is Nothing Then Cell.EntireRow.Copy Sheet8.[A1]
¥i¯à§ARng.Find(A, lookat:=xlWhole) ¤@ª½¬O§ä¤£¨ì§k¦XªºÀx¦s®æ
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¸Õ¸Õ³o­Ó:
  1. Option Explicit
  2. Sub nn()
  3. Dim Rng As Range, A As Range, cell As Range
  4. With Sheet6
  5. Set Rng = .Range(.[A1], .[A65536].End(xlUp))
  6. End With
  7. With Sheet7
  8. For Each A In .Range(.[D1], .[D65536].End(xlUp))
  9.     If Not Rng.Find(A, lookat:=xlWhole) Is Nothing Then
  10.        If cell Is Nothing Then Set cell = A Else Set cell = Union(cell, A)
  11.     End If
  12. Next
  13. End With

  14. Sheet8.Cells.Clear
  15. cell.EntireRow.Copy
  16. Sheet8.Range("A1").PasteSpecial Paste:=xlPasteValues

  17. End Sub
½Æ»s¥N½X
µ¹¨ä¥L¤j¤j°Ñ¦Ò:
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¥H§A¤W¶ÇªºÀÉ®×´ú¸Õ¨Ã¥¼²£¥Í¿ù»~
¥[­Ó§PÂ_¦¡¸Õ¸Õ¬Ý
If Not Cell Is Nothing Then Cell.EntireRow.Copy Sh ...
Hsieh µoªí©ó 2010-8-5 23:04


¥[¤FIf Not Cell Is Nothing Then Cell.EntireRow.Copy Sheet8.[A1]
ÁÙ¬O¤@¼Ë¿ù»~­C

¦b±z¨º°õ¦æ¥¿½T¶Ü?

TOP

¥»©«³Ì«á¥Ñ kimbal ©ó 2010-8-6 01:10 ½s¿è

¦^´_ 6# ycchenzd

ª©¥»°ÝÃD,07¤W¹B¬O¨S°ÝÃDªº, 03ªº·|¥X°ÝÃD

½Ð¸Õ¸Õ§â
  1. Cell.EntireRow.Copy Sheet3.[A1]¡@
½Æ»s¥N½X
´«¦¨
  1. cell.EntireRow.Copy
  2. Sheet3.Range("A1").PasteSpecial Paste:=xlPasteValues
½Æ»s¥N½X
À´±oµo°Ý,µª®×´N·|¦b¨ä¤¤

¤µ¤éの¤@¬íは  ©ú¤éにない
http://kimbalko-chi.blogspot.com
http://kimbalko.blogspot.com

TOP

¥H§A¤W¶ÇªºÀÉ®×´ú¸Õ¨Ã¥¼²£¥Í¿ù»~
¥[­Ó§PÂ_¦¡¸Õ¸Õ¬ÝIf Not Cell Is Nothing Then Cell.EntireRow.Copy Sh ... ¥i¯à§ARng.Find(A, lookat:=xlWhole) ¤@ª½¬O§ä¤£¨ì§k¦XªºÀx¦s®æ
Hsieh µoªí©ó 2010-8-5 23:04

¸Õ¸Õ¬Ý­×§ï¦¨ Rng.Find(A, LookIn:=xlValues, lookat:=xlWhole)

TOP

¦^´_  ycchenzd

ª©¥»°ÝÃD,07¤W¹B¬O¨S°ÝÃDªº, 03ªº·|¥X°ÝÃD

½Ð¸Õ¸Õ§â´«¦¨
kimbal µoªí©ó 2010-8-6 01:07



´ú¸ÕOK,µL¿ù»~¤F
¦ý¬O¦P¼Ë¹q¸£,¥t¤@­ÓÀÉ®×¥H­ìµ{¦¡¤]¬OOK,®t§O¥u¦b¸ê®Æ¨Ó·½¤£¤@¼Ë
¤£ª¾¦ó¦]?

¤£¹LÁÙ¬OOK¤F
ÁÂÁ¤F

TOP

¦^´_ 8# GBKEE


§ï¤Ñ¦A¨Ó¸Õ¸Õ³o­Ó
Àɮצb¤½¥q¹q¸£
ÁÂÁ¤F

TOP

        ÀR«ä¦Û¦b : ­ì½Ì§O¤H´N¬Oµ½«Ý¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD