- ©«¤l
- 10
- ¥DÃD
- 3
- ºëµØ
- 0
- ¿n¤À
- 18
- ÂI¦W
- 0
- §@·~¨t²Î
- XP
- ³nÅ骩¥»
- 2003
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2011-2-18
- ³Ì«áµn¿ý
- 2011-11-20
|
¥»©«³Ì«á¥Ñ ivan731129 ©ó 2011-2-22 10:32 ½s¿è
¤W§«ô·PÁ«e½ú¦^À³¡A¦ý¬O«á¨Ó¦bקï®É
¤£ª¾¹D¬O¸ê®Æ¶q°ÝÃDÁÙ¬O³]©w¿ù»~¡A¦A¶]®É·|¥X²{«¬ºA¤£²Å¦X¡C½Ð°Ý¬Oþ¸Ì³]¿ù?- Sub Ex()
- Sub Ex()
- Dim A As Range
- Set d = CreateObject("Scripting.Dictionary")
- Set d1 = CreateObject("Scripting.Dictionary")
- d1("¾÷ºcºÞ½s") = Array("¾÷ºcºÞ½s", "¾÷ºc¦WºÙ", "¥Ó³ø®É¶¡", "¥Ó³ø«¶q", "³Ì¤j¤ë²£¥Í¶q", "¥§¡¤ë²£¥Í¶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(, 1))) Then
- d1(A & A.Offset(, 1)) = Array(A.Value, A.Offset(, 1).Value, A.Offset(, 8).Value, A.Offset(, 9).Value, A.Offset(, 10).Value, A.Offset(, 11).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(, 1))
- If A.Offset(, 10).Value > ar(10) Then ar(10) = A.Offset(, 10).Value
- d1(A & 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 |
|