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

[µo°Ý] ¤§«e¸ß°Ý¹L¨âµ§¤£¦P¸ê®Æ¾ã¦X¡A¥Ø«e¤S¹J¨ì£¸¨Ç°ÝÃD¡C(¥HªþÀÉ)

[µo°Ý] ¤§«e¸ß°Ý¹L¨âµ§¤£¦P¸ê®Æ¾ã¦X¡A¥Ø«e¤S¹J¨ì£¸¨Ç°ÝÃD¡C(¥HªþÀÉ)

¥»©«³Ì«á¥Ñ ivan731129 ©ó 2011-2-25 13:45 ½s¿è

¤§«e¬O±N¨âµ§¤£¦P¸ê®Æ¾ã²z¦¨¤@¥÷¡A¦ý¤§«e¬O£¸®a¤½¥q§t¦hµ§¦P²£«~²£¶q¸ê®Æ¹ïÀ³¤@µ§¤½¥q¦a§}¸ê®Æ
¨º«á¨Ó·Q­×§ï¦¨£¸®a¤½¥q§t¤@µ§²£«~²£¶q¸ê®Æ¹ïÀ³¤@µ§¤½¥q¦a§}¸ê®Æ
¦]¦¹­×§ï¦¨¥H¤U
  1. Sub Ex()
  2. Dim A As Range
  3. Set d = CreateObject("Scripting.Dictionary")
  4. Set d1 = CreateObject("Scripting.Dictionary")
  5. d1("¾÷ºcºÞ½s") = Array("¾÷ºcºÞ½s", "¾÷ºc¦WºÙ", "¥N½X", "¥N½X¤¤¤å¦WºÙ", "³Ì¤j¤ë²£¥Í¶q", "¨Æ·~¾÷ºc¦a§}", "­t³d¤H©m¦W", "­t³d¤H¾ºÙ", "­t³d¤H¹q¸Ü", "Àô«O³¡ªù¦WºÙ", "Àô«O³¡ªù­t³d¤H", "Àô«O³¡ªù¹q¸Ü", "¼o²M®Ñ¤½§iÃþ§O")

  6. With Sheet2
  7.    For Each A In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp))
  8.      d(A.Value) = Array(A.Offset(, 6).Value, A.Offset(, 12).Value, A.Offset(, 13).Value, A.Offset(, 14).Value, A.Offset(, 15).Value, A.Offset(, 16).Value, A.Offset(, 17).Value, A.Offset(, 31).Value)
  9.   Next
  10. End With
  11. With Sheet1
  12.    For Each A In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp))
  13.    If IsEmpty(d1(A & A.Offset(, 10) & A.Offset(, 1))) Then      
  14.   
  15.       d1(A & A.Offset(, 10) & A.Offset(, 1)) = Array(A.Value, A.Offset(, 1).Value, A.Offset(, 6).Value, A.Offset(, 7).Value, A.Offset(, 10).Value, d(A.Value)(0), d(A.Value)(1), d(A.Value)(2), d(A.Value)(3), d(A.Value)(4), d(A.Value)(5), d(A.Value)(6), d(A.Value)(7))
  16.    
  17. Else
  18.      ar = d1(A & A.Offset(, 10) & A.Offset(, 1))
  19.      
  20.      If A.Offset(, 10).Value > ar(4) Then ar(4) = A.Offset(, 10).Value
  21.      d1(A & A.Offset(, 10) & A.Offset(, 1)) = ar
  22.    
  23.     End If
  24.    Next
  25. End With
  26. Sheet5.[A1].Resize(d1.Count, 19) = Application.Transpose(Application.Transpose(d1.items))
  27. End Sub
½Æ»s¥N½X
¦ý¬O¹J¨ìªº°ÝÃD¬°¡A¤£ª¾¬°¦ó¥X¨Óªº¸ê®Æ·|§R±¼¨â¤Tµ§¡C
¬O¦b­þ­Ó³¡¥÷¨S¯Á¤Þ¨ì©O? ¥D­n´N¬O­n°µ­«½Æ¸ê®Æ¿z©Ó³æµ§¸ê®Æ¡C

[ª©¥DºÞ²z¯d¨¥]
  • Hsieh(2011-2-25 10:53): ½Ð¤W¶ÇÀÉ®×»¡©ú

¥»©«³Ì«á¥Ñ ivan731129 ©ó 2011-2-25 14:43 ½s¿è

¦]¬°­ì¥»·Q¥Î¶i¶¥¿z¿ï°µ¤£­«½Æ¸ê®Æ¡A¦ý¬O¨Ï¥Î®É§Úªº¸ê®Æ«¬ºA¤@ª½¥X²{¿ù»~¤£¯à°õ¦æ¡C
­Y¬O¥Î¥¨¶°­n¦p¦ó³B²z³]©w¨ì·s­¶­±©O?

TESTADDRESS.rar (21.19 KB)
ªþÀÉ¡A²¤Æªº¤Öµ§¸ê®Æ©M¥¨¶°
·í¸ê®Æ¤Ö®É¿z¿ï¦ü¥G¨S°ÝÃD¡A¦ý¬O·í®M¥Î¦b­ì¸ê®Æ®É¡A¦³¨Ç¸ê®Æ·|lose±¼¡C
¦b¨Ï¥Î¤W¦¸¸ß°Ý­×§ï¹Lªº¥¨¶°®É¡A¨ú¹ïÀ³¦hµ§²£¶q¸ê®Æ¡A¨Ã¤£·|¦³lose¦ý¬O·í¥u·Q¨ú¤@µ§®É¤~µo¥Í°ÝÃD¡C
¤£ª¾¬O§_¦]¬°¦³¨Ç³Ì¤j²£¶q¬°¨S¸ê®ÆªºÃö«Y¶Ü?¦ý¬O«á¨ÓÀˬdµo²{¦ü¥G¤£¬O³o°ÝÃD¡C
ÁÙ¦³·í§Ú¦a§}¸ê®Æ¨S¨º®a¤½¥q®É(¨è·N§R±¼¤@µ§¦a§}¸ê®Æ´ú¸Õ)¡A¥¨¶°·|Åã¥Ü«¬ºA¤£²Å¡A¬O§_¯à°÷Åý¨S¦a§}¸ê®Æªº¤½¥q¾ã²z«á¥u·|Åý«á­±¯d¥Õ©O?
¦b·Ð½Ð«e½úÀˬd­×§ï¡C

TOP

        ÀR«ä¦Û¦b : «Î¼e¤£¦p¤ß¼e¡C
ªð¦^¦Cªí ¤W¤@¥DÃD