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

¸ê®Æ¤ñ¹ï

OK.. ¥ýÁÂÁÂ... §Ú¿ð¤@ÂI¤W¶Çµ¹§A¬Ý..

TOP

¦^´_ 3# waterfox

¦ý¦pªG¦³¦n¦h¦æ³£¤£¦bsheet 2¤º... §A¥H¤Wªºµ{¦¡¬O¦pªGSheet1 ¦³´X¦æ¬O¦bsheet 2§ä¤£¨ìªº, ¨º¥u±N§ä¤£¨ìªº²Ä¤@¦æ¥[¨ìsheet 2³Ì§À... ¦pªG­n±N©Ò¦³¦bsheet 1³£§ä¤£¨ì³£¥[¦bsheet 2, ¨º¦p¦ó³B²z
=>­ì¥ýªºµ{¦¡´N¬O±Nsheet 1§ä¤£¨ì³£¥[¦bsheet 2ªº³Ì§À
   sheet 1¦³3¦æ¦bsheet 2¬O§ä¤£¨ìªº,´N¦bsheet 2ªº³Ì§À¥[¤Wsheet 1ªº3¦æ
   sheet 1¦³5¦æ¦bsheet 2¬O§ä¤£¨ìªº,´N¦bsheet 2ªº³Ì§À¥[¤Wsheet 1ªº5¦æ


... ¥t¥~¦pªG°£¤Fcolumn A, column B ­nmatch ¥~... ¦pªG­ncolumn C and column D³£­nmatch ¨º¤S¦p¦ó... ÁÂÁ§A§rresigter 313.
=>¬O¤£¬O¥ý¤W¶Ç§AªºexcelÀÉ®×,¤ñ¸ûª¾¹DªºÀɮתºµ²ºc

TOP

¦hÁ§Aªº¦^ÂЧr... ¦ý¦pªG¦³¦n¦h¦æ³£¤£¦bsheet 2¤º... §A¥H¤Wªºµ{¦¡¬O¦pªGSheet1 ¦³´X¦æ¬O¦bsheet 2§ä¤£¨ìªº, ¨º¥u±N§ä¤£¨ìªº²Ä¤@¦æ¥[¨ìsheet 2³Ì§À... ¦pªG­n±N©Ò¦³¦bsheet 1³£§ä¤£¨ì³£¥[¦bsheet 2, ¨º¦p¦ó³B²z... ¥t¥~¦pªG°£¤Fcolumn A, column B ­nmatch ¥~... ¦pªG­ncolumn C and column D³£­nmatch ¨º¤S¦p¦ó... ÁÂÁ§A§rresigter 313.

TOP

¦^´_ 1# waterfox
  1. Sub XX()
  2. Set d = CreateObject("scripting.dictionary")
  3. For Each A In Sheet1.Range("A1:A" & [A1].End(xlDown).Row)
  4.   d(A & "," & A.Offset(0, 1)) = A.Offset(0, 2)
  5. Next
  6. For Each A In Sheet2.Range("A1:A" & [A1].End(xlDown).Row)
  7.   If d.Exists(A & "," & A.Offset(0, 1)) Then
  8.      A.Offset(0, 3) = d(A & "," & A.Offset(0, 1))
  9.      d.Remove (A & "," & A.Offset(0, 1))
  10.   End If
  11. Next
  12. Ar = d.keys
  13. For I = 0 To UBound(Ar)
  14.   Sheet2.[A1].End(xlDown).Offset(1, 0).Resize(1, 2) = Split(Ar(I), ",")
  15. Next I
  16. Sheet2.[C1].End(xlDown).Offset(1, 0).Resize(d.Count, 1) = Application.Transpose(d.items)
  17. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ªY½à§O¤H´N¬O²øÄY¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD