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

[µo°Ý] ¦b¦P¤@¦C¦P®É¤ñ¹ï¨âÄæ¸ê®Æ¤èªk

¦^´_ 20# Hsieh

¤ÓÁÂÁÂHsiehª©¤j!!³o¬O§Ú·Q­nªºµ²ªG~
¤]ÁÂÁÂsmouse0220©MGBKEE¨â¦ì..
¦b»ä­·°²¤¤ÁÙ­n°Ê¸£~
¸£²Ó­MÀ³¸Ó¦º¤F¤£¤Ö...
¸U¤À·PÁÂ

TOP

¦^´_ 20# Hsieh


ª©¤j·Q½Ð±Ð¤@¤U¡A¥Ø«e§ä¤£¨ì¸ê®Æ¬O©¿²¤±¼(¦b³Ì«á¤@­¶¤W§ä¤£¨ì¥ô¦óªº¸ê®Æ)¡A¬O§_¥i¥H§ï¦¨§ä¤£¨ì¸ê®Æ¬O§_ÁÙ¬O¥i¥HÅã¥Ü²Ä¤@­¶ªº«~¸¹¡A¨ä¥¦Äæ¦ìÅã¥Ü"ªÅ¥Õ"©Î¬O"¬dµL¸ê®Æ"?

TOP

¦^´_ 20# Hsieh


¶¶«K·Q½Ð±Ð¡A¦b²Ä17¦Cªº¦ì¸m¥Î¤FIF¦ý¬O¬°¤°»ò¤U­±¤£¥ÎEND IF°µµ²§ô
¦Ó18¦Cªºµ{¦¡½X¤S¬O¥Nªí¤°»ò·N«ä©O?

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2012-8-6 22:38 ½s¿è

¦^´_ 23# °²­±¶W¤H
  1. Sub nn()
  2. Dim Ar(), A As Range, B As Range
  3. With Sheets("Sheet1")
  4. For Each A In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp))  '²Ä¤@­¶A2¥H¤U°µ°j°é
  5.   For Each Sh In Sheets(Array("Sheet2", "Sheet3")) '­ì¸ê®Æ©Ò¦b¤u§@ªí
  6.   With Sh
  7.      For Each B In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp))  '¦bA2¥H¤UÀx¦s®æ°µ°j°é
  8.         If B = A Then  '¸ò²Ä¤@­¶AÄæÀx¦s®æ°µ¤ñ¹ï¡A¦pªG²Å¦X
  9.            ReDim Preserve Ar(s)  'ÂX¤j°}¦C
  10.            Ar(s) = Array(B.Value, B.Offset(, 1).Value, B.Offset(, 2).Value, B.Offset(, 4).Value)  '±N­È¼g¤J°}¦C
  11.            s = s + 1  '·Ç³Æ¤U¤@¦¸ÂX¤j°}¦C
  12.         End If
  13.      Next
  14.   End With
  15.   Next
  16.   With Sheets("³Ì²×µ²ªG")
  17.      If s > 0 Then .Cells(.Rows.Count, 1).End(xlUp).Offset(1).Resize(s, 4).Value = Application.Transpose(Application.Transpose(Ar)) Else _
  18. .Cells(.Rows.Count, 1).End(xlUp).Offset(1).Resize(, 4).Value =Array(A.value,"","","")  '¦pªG°}¦C¦³¤º®e¡A´N±N°}¦C¼g¤Jµ²ªG¡A§_«h¼g¤J¤@¦CªÅ¥Õ
  19.      Erase Ar: s = 0  '²MªÅ°}¦C¡A¨Ã·Ç³Æ¤U¤@­Ó°}¦Cªì©l¤j¤p
  20.   End With
  21. Next
  22. End With
  23. End Sub
½Æ»s¥N½X
17¦CªºIf³¯­z¦¡¡A¦]¬°If...Then...¦b¦P¤@¦æ©Ò¥H¤£¶·End If¸Ô²Ó»yªk½Ð°Ñ¦ÒVBA»¡©ú
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 24# Hsieh
­ì¨ÓÁÙ¦³³o¼Ë¥Îªk¡A§Ú¨S¬Ý¹L...
ÁÂÁ±z~~
ÁÙ¦b§V¤O¾Ç²ß¤¤!!

TOP

        ÀR«ä¦Û¦b : ¤£©È¨Æ¦h¡A¥u©È¦h¨Æ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD