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

[µo°Ý] ¦p¦ó¼Ð¥Ü¥¼³Q¨ú¥Nªº¶µ¥Ø?

[µo°Ý] ¦p¦ó¼Ð¥Ü¥¼³Q¨ú¥Nªº¶µ¥Ø?

VBAµ{¦¡¤¤¡A¦p¦ó¦A¥[¤J«ü¥O²£¥Í¼Ð°O? ¦pªþÀÉ¡A³Â½Ð¤j¤j«üÂI¡AÁÂÁÂ! help.rar (11.98 KB)

ÁÂÁ¤£§[«ü±Ð,»°§Ö¨Ó¾Ç²ß

TOP

¦^´_ 4# aa7551
¦bVBAµøµ¡ªº»¡©ú ¿é¤JRange ¦p¹Ï



TOP

½Ð±Ðgbkeeª©¥»,--A.Offset(, 2).Resize(, 2) = d(A.Value)--¨ä¤¤ªºresize,¥Î»¡©ú¬d§ä¨S§ä¨ì,¥i§_¸Ñµª¨ä¥Îªk,©Î¬O¨º¸Ì¦³°Ñ¦Ò¸ê®Æ

TOP

«z«¢«¢¡AÁÂÁÂGBKEE¤j¤j!

TOP

¥»©«³Ì«á¥Ñ GBKEE ©ó 2010-12-10 12:42 ½s¿è

¦^´_ 1# winston219
  1. Sub Ex()
  2. Dim A As Range, d As Object, Rng(1) As Range
  3. Set Rng(0) = Sheet2.Range(Sheet2.[A2], Sheet2.[A65536].End(xlUp))
  4. Set Rng(1) = Sheet1.Range(Sheet1.[A1], Sheet1.[A65536].End(xlUp))
  5. Set d = CreateObject("Scripting.Dictionary")
  6. For Each A In Rng(0)
  7.     d(A.Value) = Array(A.Offset(, 2).Value, A.Offset(, 1).Value)
  8. Next
  9. For Each A In Rng(1)
  10.     If d.exists(A.Value) = True Then
  11.         A.Offset(, 2).Resize(, 2) = d(A.Value)
  12.         d.Remove (A.Value)
  13.     End If
  14. Next
  15. For Each A In Rng(0)
  16.     If d.exists(A.Value) = True Then A.Cells(1, 4) = "¥¼²Å¦X"
  17. Next
  18. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¹ï¤÷¥À­nª¾®¦¡A·P®¦¡B³ø®¦¡C
ªð¦^¦Cªí ¤W¤@¥DÃD