¥»©«³Ì«á¥Ñ 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- Sub Ex()
- Dim A As Range
- Set d = CreateObject("Scripting.Dictionary")
- Set d1 = CreateObject("Scripting.Dictionary")
- 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")
- With Sheet2
- For Each A In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp))
- 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)
- Next
- End With
- With Sheet1
- For Each A In .Range(.[A2], .Cells(.Rows.Count, 1).End(xlUp))
- If IsEmpty(d1(A & A.Offset(, 10) & A.Offset(, 1))) Then
-
- 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))
-
- Else
- ar = d1(A & A.Offset(, 10) & A.Offset(, 1))
-
- If A.Offset(, 10).Value > ar(4) Then ar(4) = A.Offset(, 10).Value
- d1(A & A.Offset(, 10) & A.Offset(, 1)) = ar
-
- End If
- Next
- End With
- Sheet5.[A1].Resize(d1.Count, 19) = Application.Transpose(Application.Transpose(d1.items))
- End Sub
½Æ»s¥N½X ¦ý¬O¹J¨ìªº°ÝÃD¬°¡A¤£ª¾¬°¦ó¥X¨Óªº¸ê®Æ·|§R±¼¨â¤Tµ§¡C
¬O¦bþÓ³¡¥÷¨S¯Á¤Þ¨ì©O? ¥Dn´N¬On°µ«½Æ¸ê®Æ¿z©Ó³æµ§¸ê®Æ¡C |