- ©«¤l
- 1
- ¥DÃD
- 1
- ºëµØ
- 0
- ¿n¤À
- 2
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows 7
- ³nÅ骩¥»
- office 2007
- ¾\ŪÅv
- 10
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2014-9-5
- ³Ì«áµn¿ý
- 2014-12-19
|
[µ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 ªÅ®æ ¿é¤Jb·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
- Dim X, Y As IntegerApplication.EnableEvents = False
- Y = 11
- X = 2
- ActiveSheet.Unprotect
- Range("A11:E50").Delete
- Do Until Sheets("No Duplicate").Range("E" & X).Value = ""
- H = Sheets("Look_up").Range("B4").Value
- L = Sheets("No Duplicate").Range("E" & X).Value
- If L = H Then
- Sheets("Look_up").Range("A" & Y).Value = Sheets("No Duplicate").Range("I" & X).Value
- Sheets("Look_up").Range("B" & Y).Value = Sheets("No Duplicate").Range("B" & X).Value
- Sheets("Look_up").Range("C" & Y).Value = Sheets("No Duplicate").Range("E" & X).Value
- Sheets("Look_up").Range("D" & Y).Value = Sheets("No Duplicate").Range("F" & X).Value
- Sheets("Look_up").Range("E" & Y).Value = Sheets("No Duplicate").Range("G" & X).Value
- Y = Y + 1
- X = X + 1
- Else
- X = X + 1
- End If
- Loop
- Application.DisplayAlerts = False
- Range("A11").Select
- Selection.CurrentRegion.Select
- Selection.CreateNames Top:=True, Left:=False, Bottom:=False, Right:= _
- False
-
- Range("A4").Select
- Application.DisplayAlerts = True
- MsgBox "Finished"
- 'ActiveSheet.Protect DrawingObjects:=True, Contents:=True, Scenarios:=True
- Application.EnableEvents = True
- End Sub
½Æ»s¥N½X ½Ð¬Ý attache¡@file¡C |
-
-
test.zip
(995.56 KB)
|