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

[µo°Ý] ½Ð°ÝAutoFill°ÝÃD

[µo°Ý] ½Ð°ÝAutoFill°ÝÃD

¥»©«³Ì«á¥Ñ ken759727 ©ó 2012-2-16 20:02 ½s¿è

½Ð°Ý¤p§Ìvba¦p¤U¡A
¤ñ¹ï¤é´Á¡®¶K¤W³o³¡¤À³B²z¨ä¥L¤À­¶³£¨S°ÝÃD
¦ý¬O©¹¤U¶ñº¡Äæ¦ìªº¥\¯à«oµLªk°õ¦æ¦b¨ä¥L¤À­¶[¬õ¦â³¡¤À]
¤£ª¾¹D¬O­þÃä¼g¿ù¤F¡C

Worksheets("0051¸ê®Æ®w").Range("EA320:FQ320").Select
Selection.AutoFill Destination:=Worksheets("0051¸ê®Æ®w").Range("EA320:FQ" & i), Type:=xlFillDefault
Worksheets("0051¸ê®Æ®w").Range("EA320:FQ" & i).Select
  1. Dim i As Integer
  2. Private Sub CommandButton1_Click()
  3. For i = 22 To 10000

  4. '¤ñ¹ï¤é´Á¶K¤W
  5. If Worksheets("0050¸ê®Æ®w").Range("A20") = Worksheets("0050¸ê®Æ®w").Range("A" & i) Then
  6. Worksheets("0050¸ê®Æ®w").Range("B" & i & ":DQ" & i).Value = Worksheets("0050¸ê®Æ®w").Range("B20:DQ20").Value
  7. Worksheets("0051¸ê®Æ®w").Range("A" & i & ":DZ" & i).Value = Worksheets("0051¸ê®Æ®w").Range("A20:DZ20").Value


  8. '¶K¤W«á¶ñº¡¤½¦¡
  9. Worksheets("0050¸ê®Æ®w").Range("DR320:FE320").Select
  10. Selection.AutoFill Destination:=Worksheets("0050¸ê®Æ®w").Range("DR320:FE" & i), Type:=xlFillDefault
  11. Worksheets("0050¸ê®Æ®w").Range("DR320:FE" & i).Select

  12. Worksheets("0051¸ê®Æ®w").Range("EA320:FQ320").Select
  13. Selection.AutoFill Destination:=Worksheets("0051¸ê®Æ®w").Range("EA320:FQ" & i), Type:=xlFillDefault
  14. Worksheets("0051¸ê®Æ®w").Range("EA320:FQ" & i).Select

  15. Worksheets("0050¸ê®Æ®w").Range("E14").Select

  16. GoTo stockup
  17. End If
  18. Next

  19. stockup:
  20. End Sub
½Æ»s¥N½X

Test_v4.rar (329.41 KB)

ÀÉ®×

¦^´_ 1# ken759727
µ{¦¡½X¨S¦³¿ù»~
¦ý¬O©¹¤U¶ñº¡Äæ¦ìªº¥\¯à«oµLªk°õ¦æ¦b¨ä¥L¤À­¶     ¬O¦ó·N«ä
Worksheets("0051¸ê®Æ®w").Range("EA320:FQ320").Select  ¤u§@ªí¦WºÙªº°ÝÃD¬O¶Ü?

TOP

¦^´_ 2# GBKEE

GBKEE   §Ú¦³¤W¶ÇÀɮפF
½Ð±zÆ[¬Ý...§Ú¤£ª¾¹D§Ú­þ¸Ì¥X¤F°ÝÃD

0051¸ê®Æ®w  ¬O¤u§@ªí¦WºÙ

¦b0050³£¥i°õ¦æ ¶K¤W»P¦V¤U¶ñº¡¤u§@ªí

¦ý¬O¦b0051¥u¯à°µ¶K¤W...¥t¤@¶µ¥\¯à¨Ï¥Î¤F´N¥X¿ù

TOP

¦^´_ 3# ken759727
µ{¦¡¤¤  Range("????").Select  «e­±¦³«ü©w¤u§@ªí
¦pWorksheets("0051¸ê®Æ®w").Range("EA320:FQ" & i).Select
¦¹Worksheets("0051¸ê®Æ®w")  ¥²¶·¬O§@¥Î¤¤ªº¤u§@ªí
©Ò¥H³o¤@¦æ Worksheets("0051¸ê®Æ®w").Activate ¨Ï¤u§@ªí¬°§@¥Î¤¤
  1. Dim i As Integer
  2. Private Sub CommandButton1_Click()
  3. For i = 22 To 10000
  4. '¤ñ¹ï¤é´Á¶K¤W
  5. If Worksheets("0050¸ê®Æ®w").Range("A20") = Worksheets("0050¸ê®Æ®w").Range("A" & i) Then
  6. Worksheets("0050¸ê®Æ®w").Range("B" & i & ":DQ" & i).Value = Worksheets("0050¸ê®Æ®w").Range("B20:DQ20").Value
  7. Worksheets("0051¸ê®Æ®w").Range("A" & i & ":DZ" & i).Value = Worksheets("0051¸ê®Æ®w").Range("A20:DZ20").Value
  8. '¶K¤W«á¶ñº¡¤½¦¡
  9. Worksheets("0050¸ê®Æ®w").Activate                           '****­n¥[¤W³o¦æ ¿ï¾Ü¬°§@¥Î¤¤ªº¤u§@ªí
  10. Worksheets("0050¸ê®Æ®w").Range("DR320:FE320").Select
  11. Selection.AutoFill Destination:=Worksheets("0050¸ê®Æ®w").Range("DR320:FE" & i), Type:=xlFillDefault
  12. Worksheets("0050¸ê®Æ®w").Range("DR320:FE" & i).Select

  13. Worksheets("0051¸ê®Æ®w").Activate                           '****­n¥[¤W³o¦æ ¿ï¾Ü¬°§@¥Î¤¤ªº¤u§@ªí
  14. Worksheets("0051¸ê®Æ®w").Range("EA320:FQ320").Select
  15. Selection.AutoFill Destination:=Worksheets("0051¸ê®Æ®w").Range("EA320:FQ" & i), Type:=xlFillDefault
  16. Worksheets("0051¸ê®Æ®w").Range("EA320:FQ" & i).Select

  17. Worksheets("0050¸ê®Æ®w").Activate                           '****­n¥[¤W³o¦æ ¿ï¾Ü¬°§@¥Î¤¤ªº¤u§@ªí
  18. Worksheets("0050¸ê®Æ®w").Range("E14").Select
  19. GoTo stockup
  20. End If
  21. Next
  22. stockup:
  23. End Sub
½Æ»s¥N½X

TOP

        ÀR«ä¦Û¦b : ¤@­Ó¤Hªº§Ö¼Ö¡D¤£¬O¦]¬°¥L¾Ö¦³±o¦h¡A¦Ó¬O¦]¬°¥L­p¸û±o¤Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD