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

[µo°Ý] ³øªí­¶§À´¡¦æ

[µo°Ý] ³øªí­¶§À´¡¦æ

Sub ´¡¦æ()
Dim c As Integer
c = 50
For i = 1 To 10
Range("2:2").Copy
Range(c & ":" & c).Insert (XlInsertShiftDirection.xlShiftDown)
c = c + 47

Next
Application.CutCopyMode = False
End Sub

§Ú·Q¦b¨C­¶ªº­¶§À¶K¤W²Ä2¦C¼ÐÀY¡A¥H¤W¬Oºô¸ô¤W§ä¨Ó­×§ïªº¡A¶K´X­¶(¦¸)­n¦Û¤v³]©w¡A¦³¨S¦³¿ìªkÅý¥L¦Û°Ê§P§O­¶¼Æ¡A¤£¥Î¦A­×§ïi­È©O¡H
--
ªì¾Ç¸£³UÁÙÂण¤Ó¹L¨Ó¡A«ùÄò°Ñ¦Ò«e¤H´¼¼z¤¤=__=

·PÁÂGBKEE¤j¤j¼·¤¾¦^ÂÐm(_   _)m
­¶§À§Ú·Q­«ÂвÄ2¦æªº"ªí®æ"(­¶­º¥i¥H¥Î"¦C¦L¼ÐÃD"¸Ñ¨M)
¦ý¬O­¶§À¬Ý«e½ú­Ìªº«Øij¬O¡A§ï¦¨¹Ï¤ù©ñ¤J­¶§À©Î¤â°Ê´¡¦æ
§Úªº­¶§À±`ÅÜ°Ê¡A§ï¦¨¹Ï¤ù«Ü¯Ó®É¶¡¡A©Ò¥H·Q¥Îvba°õ¦æ´¡¦æ

¥H¤U¬°°Ñ¦Òªº¤å³¹
http://forum.twbts.com/viewthread.php?tid=6672
http://tw.knowledge.yahoo.com/question/question?qid=1012101501113
¤£¹L¤Óªá®É¶¡¡A³£¤£¤Ó²Å¦X§Úªº»Ý¨D

--
§ÚÁ٫ܵæ¡A½Ð¤j®a¨£½Ì

TOP

  1. Sub ´¡¦æ()
  2. Dim c, r, j As Integer
  3. c = 50

  4. r = Range("A65536").End(xlUp).Row


  5. If r > 50 Then

  6. Range("2:2").Copy
  7. Range(c & ":" & c).Insert (XlInsertShiftDirection.xlShiftDown)
  8. j = WorksheetFunction.RoundDown((r - 50) / 47, 0)
  9. End If
  10. For i = 1 To j
  11. c = c + 47
  12. Range(c & ":" & c).Insert (XlInsertShiftDirection.xlShiftDown)

  13. Next
  14. Application.CutCopyMode = False
½Æ»s¥N½X
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¥»©«³Ì«á¥Ñ jak ©ó 2012-11-15 13:38 ½s¿è

·PÁÂsoftsadwind ¤j¤jÀ°¦£¡A§Ú¸Õ¹L§Aªºµ{¦¡½X¤F¡A¥i¥H¸Ñ¨M§Úªº°ÝÃD¡A
¥H¤U¦³¨â¦æÂŦ⪺³¡¤À¡AÀ³¸Ó¬O¤j¤j¦£¤¤º|¤F¡A¥[¤W´N¥i²Å¦X§Úªº»Ý¨D¡A¦A¦¸·PÁÂm(_  _)m¡C

Sub ´¡¦æ()
Dim c, r, j As Integer
c = 50

r = Range("A65536").End(xlUp).Row


If r > 50 Then

Range("2:2").Copy
Range(c & ":" & c).Insert (XlInsertShiftDirection.xlShiftDown)
j = WorksheetFunction.RoundDown((r - 50) / 47, 0)
End If
For i = 1 To j
c = c + 47
Range("2:2").Copy
Range(c & ":" & c).Insert (XlInsertShiftDirection.xlShiftDown)

Next
Application.CutCopyMode = False
End sub

TOP

        ÀR«ä¦Û¦b : ¥¬¬I¦p¼½ºØ¡A¥HÅw³ß¤ß´þ¼íºØ¤l¡A¤~·|µoªÞ¡C
ªð¦^¦Cªí ¤W¤@¥DÃD