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

½Ð±Ð¦p¦ó¤ñ¹ï¸ê®Æ¡A¨Ã§ó·s¡C

½Ð±Ð¦p¦ó¤ñ¹ï¸ê®Æ¡A¨Ã§ó·s¡C

50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

¦^´_ 1# alpha
  1. Sub nn()
  2. Set d = CreateObject("Scripting.Dictionary")
  3. Set d1 = CreateObject("Scripting.Dictionary")
  4. For Each a In Range([A2], [A2].End(xlDown))
  5.   d(a.Value) = a.Offset(, 1).Value
  6.   d1(a.Value) = a.Offset(, 2).Value
  7. Next
  8. For Each a In Range([H2], [H2].End(xlDown))
  9.    a.Offset(, 1) = a.Offset(, 1).Value + d(a.Value)
  10.    d.Remove a.Value
  11.    a.Offset(, 2) = a.Offset(, 2).Value + d1(a.Value)
  12.    d1.Remove a.Value
  13. Next
  14. For Each ky In d.keys
  15.   [H65536].End(xlUp).Offset(1, 0).Resize(, 3) = Array(ky, d(ky), d1(ky))
  16. Next
  17. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

ÁÂÁ¶Wª©¨ó§U¡C
¬ã¨s¤¤¡C
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

        ÀR«ä¦Û¦b : ¤H¥Í¨S¦³©Ò¦³Åv¡A¥u¦³¥Í©Rªº¨Ï¥ÎÅv¡C
ªð¦^¦Cªí ¤W¤@¥DÃD