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

¶×¥X_¦ý¤£­«ÂжץXªº¸ê®Æ

¦^´_ 1# hugh0620
  1. Private Sub CommandButton1_Click()
  2. Dim Ay()
  3. Set d = CreateObject("Scripting.Dictionary")
  4. With Sheet2
  5. ar = .Range(.[B5], .[B5].End(xlDown).Offset(, 2))
  6. For i = 1 To UBound(ar, 1)
  7. mystr = Join(Application.Index(ar, i))
  8. d(mystr) = d.Count
  9. Next
  10. With Sheet1
  11. ar = .Range(.[B5], .[B5].End(xlDown).Offset(, 3))
  12. For i = 1 To UBound(ar, 1)
  13. mystr = Join(Array(ar(i, 1), ar(i, 2), ar(i, 3)))
  14. If d.exists(mystr) = False Then
  15. ReDim Preserve Ay(s)
  16. Ay(s) = Application.Index(ar, i)
  17. s = s + 1
  18. End If
  19. Next
  20. End With
  21. If s > 0 Then .[B65536].End(xlUp).Offset(1, 0).Resize(s, 4) = Application.Transpose(Application.Transpose(Ay))
  22. End With
  23. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-1-4 15:49 ½s¿è

¦^´_ 3# hugh0620
  1. Private Sub CommandButton1_Click()
  2. Dim Ay()
  3. Set d = CreateObject("Scripting.Dictionary")
  4. With Sheet2
  5.     ar = .Range(.[B5], .[B5].End(xlDown).Offset(, 2))
  6.         For i = 1 To UBound(ar, 1)
  7.             mystr1 = Join(Application.Index(ar, i))
  8.             d(mystr1) = d.Count
  9.         Next

  10.     With Sheet1
  11.         ar = .Range(.[B5], .[B5].End(xlDown).Offset(, 6))
  12.         For i = 1 To UBound(ar, 1)
  13.             mystr1 = Join(Array(ar(i, 1), ar(i, 2), ar(i, 6)))
  14.             If d.exists(mystr1) = False Then
  15.                 ReDim Preserve Ay(s)
  16.                 Ay(s) = Array(ar(i, 1), ar(i, 2), ar(i, 6), ar(i, 7))
  17.                 s = s + 1
  18.             End If
  19.         Next
  20.     End With
  21.     If s > 0 Then .[B65536].End(xlUp).Offset(1, 0).Resize(s, 4) = Application.Transpose(Application.Transpose(Ay))
  22. End With

  23. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 7# hugh0620
  1. Private Sub CommandButton1_Click()
  2. Dim Ay()
  3. Set d = CreateObject("Scripting.Dictionary")
  4. With Sheet2
  5.     ar = .Range(.[B5], .[B65536].End(xlUp).Offset(, 2))
  6.         For i = 1 To UBound(ar, 1)
  7.             mystr1 = Join(Application.Index(ar, i))
  8.             d(mystr1) = d.Count
  9.         Next

  10.     With Sheet1
  11.         ar = .Range(.[B5], .[B65536].End(xlUp).Offset(, 6))
  12.         For i = 1 To UBound(ar, 1)
  13.             mystr1 = Join(Array(ar(i, 1), ar(i, 2), ar(i, 6)))
  14.             If d.exists(mystr1) = False Then
  15.                 ReDim Preserve Ay(s)
  16.                 Ay(s) = Array(ar(i, 1), ar(i, 2), ar(i, 6), ar(i, 7))
  17.                 s = s + 1
  18.             End If
  19.         Next
  20.     End With
  21.     If s > 0 Then .[B65536].End(xlUp).Offset(1, 0).Resize(s, 4) = Application.Transpose(Application.Transpose(Ay))
  22. End With
  23. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¥»©«³Ì«á¥Ñ Hsieh ©ó 2011-1-6 19:06 ½s¿è

¦^´_ 9# hugh0620
  1. Private Sub CommandButton1_Click()

  2. Dim Ay()
  3. Set d = CreateObject("Scripting.Dictionary")
  4. With Sheet2
  5. .Unprotect "password"  'password«ü¤u§@ªí«OÅ@±K½X
  6.     ar = .Range(.[B5], .[B65536].End(xlUp).Offset(, 2))
  7.         For i = 1 To UBound(ar, 1)
  8.             mystr1 = Join(Application.Index(ar, i))
  9.             d(mystr1) = d.Count
  10.         Next

  11.     With Sheet1
  12.         ar = .Range(.[B5], .[B65536].End(xlUp).Offset(, 6))
  13.         For i = 1 To UBound(ar, 1)
  14.             mystr1 = Join(Array(ar(i, 1), ar(i, 2), ar(i, 6)))
  15.             If d.exists(mystr1) = False Then
  16.                 ReDim Preserve Ay(s)
  17.                 Ay(s) = Array(ar(i, 1), ar(i, 2), ar(i, 6), ar(i, 7))
  18.                 s = s + 1
  19.             End If
  20.         Next
  21.     End With
  22.     If s > 0 Then .[B65536].End(xlUp).Offset(1, 0).Resize(s, 4) = Application.Transpose(Application.Transpose(Ay))
  23.     .Protect "password"  'password«ü¤u§@ªí«OÅ@±K½X
  24. End With

  25. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 12# hugh0620
¨º´N¨Ä¤@ÂI
  1. Private Sub CommandButton1_Click()

  2. Dim Ay()
  3. Set d = CreateObject("Scripting.Dictionary")
  4. With Sheet2
  5. .Unprotect "1234"


  6.     ar = .Range(.[B5], .[B65536].End(xlUp).Offset(, 2))
  7.         For i = 1 To UBound(ar, 1)
  8.             mystr1 = Join(Array(ar(i, 1), ar(i, 2), ar(i, 3)))
  9.             d(mystr1) = d.Count
  10.         Next

  11.     With Sheet1
  12.         ar = .Range(.[B5], .[B65536].End(xlUp).Offset(, 6))
  13.         For i = 1 To UBound(ar, 1)
  14.             mystr1 = Join(Array(ar(i, 1), ar(i, 2), ar(i, 6)))
  15.             If d.exists(mystr1) = False Then
  16.                 ReDim Preserve Ay(s)
  17.                 Ay(s) = Array(ar(i, 1), ar(i, 2), ar(i, 6), ar(i, 7))
  18.                 s = s + 1
  19.             End If
  20.         Next
  21.     End With
  22.     If s > 0 Then .[B65536].End(xlUp).Offset(1, 0).Resize(s, 4) = Application.Transpose(Application.Transpose(Ay))
  23.     .Protect "1234"

  24. End With

  25. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 15# hugh0620
  1. Private Sub CommandButton1_Click()
  2. Dim Ay()
  3. Set d = CreateObject("Scripting.Dictionary")
  4. Set d1 = CreateObject("Scripting.Dictionary")
  5. With Sheet2
  6. .Unprotect "1234"
  7.     ar = .Range(.[B5], .[B65536].End(xlUp).Offset(, 2))
  8.         For i = 1 To UBound(ar, 1)
  9.             mystr1 = Join(Array(ar(i, 1), ar(i, 2), ar(i, 3)))
  10.             d(mystr1) = d.Count
  11.         Next
  12.     With Sheet1
  13.         ar = .Range(.[B5], .[B65536].End(xlUp).Offset(, 6))
  14.         For i = 1 To UBound(ar, 1)
  15.             mystr1 = Join(Array(ar(i, 1), ar(i, 2), ar(i, 6)))
  16.             If d.exists(mystr1) = False Then
  17.                 ReDim Preserve Ay(s)
  18.                 Ay(s) = Array(ar(i, 1), ar(i, 2), ar(i, 6), ar(i, 7))
  19.                 s = s + 1
  20.                 Else
  21.                 d1(mystr1) = ar(i, 7)
  22.             End If
  23.         Next
  24.     End With
  25.     For Each a In .Range(.[B5], .[B65536].End(xlUp))
  26.       mystr1 = Join(Array(a, a.Offset(, 1), a.Offset(, 2)))
  27.       a.Offset(, 3) = d1(mystr1)
  28.     Next
  29.     If s > 0 Then .[B65536].End(xlUp).Offset(1, 0).Resize(s, 4) = Application.Transpose(Application.Transpose(Ay))
  30.     .Protect "1234"
  31. End With
  32. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 17# hugh0620


    §A¤£¬O§Æ±æÂмg¶Ü?
·íµM¤ñ¹ï¨ì­«½Æªº´N³Q·sªº¨ú¥Nªü
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

        ÀR«ä¦Û¦b : ¤ß¤¤±`¦sµ½¸Ñ¡B¥]®e¡B·P«ä¡Bª¾¨¬¡B±¤ºÖ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD