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

[µo°Ý] ¦pªG¥ÎÃöÁä³æ¦r¤J§ä´M¸ê®Æ¤ÎÅã¥Ü¥X¨Ó

[µo°Ý] ¦pªG¥ÎÃöÁä³æ¦r¤J§ä´M¸ê®Æ¤ÎÅã¥Ü¥X¨Ó

¤j®a¦n!~~¦]¥»¤H¼gªºVB ¬O¦bºô¤W¾Ç²ß¦^¨Ó,¦³¦n¦h¤£À´¦a¤è¡C½Ð¦h¦h«ü±Ð¡C
²{¦b°Ý°ÝÃD°Õ!

§Ú«Ø¥ß¤F®Æ¼s®w¦W¬° No Duplicate ªº¤u§@ªí¤º¡C

¦Ó¦b ¤u§@ªí "Look_up"
  

§Ú³]­p¤F¥i¥H¦b A4 ªÅ®æ¤º ¿ï¾Ü ¤£¦Pªº°Ï³¡¦WºÙ«á,§ä¥X ¤u§@ªí  "No Duplicate " ªº¬ÛÃö¸ê®Æ¡A
¦b¤u§@ªí"Lookup"A11¦ÜE11ªÅ®æ¤º,¥H¤U©Ô¦¡¤èªkÅã¥Ü¥X¨Ó¡C

²{¦b§Ú·Q¦b B4 ªÅ®æ ¿é¤J­b·Hªº­^¤åÃöÁä¦r ¨Ò¦p¤j·H¦WºÙ¬O "Newton Harbour View" §Ú¥u»Ý¿é¤J­^¤å¦r¥À«e2¦Ü3­Ó¦r
¡A«ö¤U½T©w¤j·H¦W«á¡A¯à¦b¤u§@ªí"Lookup"A11¦ÜE11ªÅ®æ¤º,¥H¤U©Ô¦¡¤èªkÅã¥Ü¬ÛÃö¦r¥À¥Nªíªº¤j·H¸ê®Æ¡C

§Ú¥u¯à¼g¨ì ¥þ§¹²Å¦X±ø¥ó¤~¯à§ä¨ì¡C



  1. Dim X, Y As IntegerApplication.EnableEvents = False

  2. Y = 11
  3. X = 2
  4. ActiveSheet.Unprotect
  5. Range("A11:E50").Delete

  6. Do Until Sheets("No Duplicate").Range("E" & X).Value = ""
  7. H = Sheets("Look_up").Range("B4").Value
  8. L = Sheets("No Duplicate").Range("E" & X).Value



  9. If L = H Then

  10. Sheets("Look_up").Range("A" & Y).Value = Sheets("No Duplicate").Range("I" & X).Value
  11. Sheets("Look_up").Range("B" & Y).Value = Sheets("No Duplicate").Range("B" & X).Value
  12. Sheets("Look_up").Range("C" & Y).Value = Sheets("No Duplicate").Range("E" & X).Value
  13. Sheets("Look_up").Range("D" & Y).Value = Sheets("No Duplicate").Range("F" & X).Value
  14. Sheets("Look_up").Range("E" & Y).Value = Sheets("No Duplicate").Range("G" & X).Value
  15. Y = Y + 1
  16. X = X + 1
  17. Else
  18. X = X + 1

  19. End If



  20. Loop
  21. Application.DisplayAlerts = False

  22. Range("A11").Select
  23. Selection.CurrentRegion.Select
  24.     Selection.CreateNames Top:=True, Left:=False, Bottom:=False, Right:= _
  25.         False
  26.    
  27. Range("A4").Select
  28. Application.DisplayAlerts = True

  29. MsgBox "Finished"
  30. 'ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
  31. Application.EnableEvents = True
  32. End Sub
½Æ»s¥N½X
½Ð¬Ý attache¡@file¡C

test.zip (995.56 KB)

        ÀR«ä¦Û¦b : ¥Ç¿ù¥XÄb®¬¤ß¡A¤~¯à²M²bµL·Ð´o¡C
ªð¦^¦Cªí ¤W¤@¥DÃD