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

[µo°Ý] (¤w¸Ñ¨M)´¡¤J¤@¦ævba°ÝÃD

[µo°Ý] (¤w¸Ñ¨M)´¡¤J¤@¦ævba°ÝÃD

¥»©«³Ì«á¥Ñ freeffly ©ó 2012-2-22 17:06 ½s¿è

¤U­±¬O¤H®a´£¨Ñµ¹§Úªº
¦³´X¦U¦a¤è¬Ý¤£¤ÓÀ´
·Q°Ý¤@¤U¬°¤°»òDo While one= two ¤U­±ÁÙ­n¥[   
      A = A + 1
    two = Cells(A, 3).Value
³o¨â¦æ?
³Ì«á¤@¦Uloopªº¤W­±¬°¦óÁÙ­n¥[
A = A + 1


Sub ´¡¤J¤@¦æ()
    Dim A As Long, one As Variant, two As Variant
    A = 5
    Do While Cells(A, 3).Value <> ""
    one = Cells(A, 3).Value
    A = A + 1
    two = Cells(A, 3).Value
    Do While one = two
    A = A + 1
    two = Cells(A, 3).Value
    Loop
    ActiveSheet.Rows(A).Insert
    A = A + 1
    Loop
   
End Sub
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

§Ú¥Î³o­Óµ{¦¡¬O·Q­n¦b¬Y¤@Äæ½s¸¹¶}©l¤£¤@¼Ë®É´¡¤J¤@¦æ°µ°Ï¹j
§O¤H´£¨Ñµ¹§Úªºµ{¦¡¬Ý°_¨Ó«Ü²³æ
¥i¬O§Ú¦³ÂI¤£¤Ó²z¸Ñ
³Â·Ð¤j¤j¸ÑÄÀ¤@¤U
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

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

¦^´_ 2# freeffly
  1. Sub ´¡¤J¤@¦æ()
  2.     Dim A As Long, one As Variant, two As Variant
  3.     A = 5 '¶}©l¦C
  4.     Do While Cells(A, 3).Value <> "" 'CÄ椣¬OªÅ¥Õ´NÄ~Äò°j°é
  5.     one = Cells(A, 3).Value  '°_©l­È
  6.     A = A + 1 '¥[¤@¦C
  7.     two = Cells(A, 3).Value  '²Ä2­ÓCÄæ­È
  8.     Do While one = two  '¦pªG°_©l­È¸ò¤U¤@­ÓCÄæ­È¬Û¦P´NÄ~Äò°j°é
  9.     A = A + 1 '¤U¤@¦C
  10.     two = Cells(A, 3).Value '¤U¤@­ÓCÄæ­È
  11.     Loop
  12.     ActiveSheet.Rows(A).Insert '¹J¨ì¤£¦P­È®É¸Ó¦C´¡¤J
  13.     A = A + 1 '¤U¤@¦C¡A¦]¬°¤w¸g´¡¤J¤@¦C¥²¶·¦b©¹¤U¤@¦C¤~¬O¤£¦P­Èªº²Ä¤@­Ó¦ì¸m
  14.     Loop
  15.    
  16. End Sub
½Æ»s¥N½X
²¤Æ¤@¤U§A·|§ó²M·¡ÅÞ¿è
  1. Sub ex()
  2. r = 5
  3. Do While Cells(r, 3) <> ""
  4. first = Cells(r, 3)
  5. Do While Cells(r, 3) = first
  6.    r = r + 1
  7. Loop
  8. Rows(r).Insert
  9. r = r + 1
  10. Loop
  11. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 3# Hsieh


    Hsieh ª©¥D°tªA§Aªº­@¤ß,¯uªº¤@¦æ¦æªº¤@¤@¥[¥H»¡©ú,¯uªº«Ü¥Î¤ß°Ú!
V98

TOP

·PÁª©¥D­ÌµL¨p¤À¨É

ÀH®É¶i¨Ó½×¾ÂÁ`¬O¥i¾Ç²ß¨ìVBAªº¨Ï¥Î§Þ³N

ÁÂÁÂ
100 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

¦^´_ 3# Hsieh


   ÁÂÁ¸ѻ¡
  Â²¤Æªºª©¥»¤ñ¸û®e©ö²z¸Ñ
¦r¨å¨â¦U¦r ÁÙ¯uÃø²z¸Ñ

TOP

§Úªº¾÷¾¹A¦n¹³¤ñ¸û¦Ñ¡A¦]¦¹¡A·s¼W¤@¦C»Ý­n¤Q´X¬íªº®É¶¡¡A
¦ý¾÷¾¹B«h§Ö³t³\¦h¡A½Ð°Ý¦³¿ìªk¥i¥H¦b¾÷¾¹A¤W·d©w¶Ü¡H
³£¬Ooffice2010ªºª©¥»

ÁÂÁ¡ã

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2014-9-5 23:03 ½s¿è
§Úªº¾÷¾¹A¦n¹³¤ñ¸û¦Ñ¡A¦]¦¹¡A·s¼W¤@¦C»Ý­n¤Q´X¬íªº®É¶¡¡A
¦ý¾÷¾¹B«h§Ö³t³\¦h¡A½Ð°Ý¦³¿ìªk¥i¥H¦b¾÷¾¹A¤W·d ...
cji3cj6xu6 µoªí©ó 2014-9-5 15:22

¨º´N¥u·h°Ê»Ý­n·h°ÊªºÀx¦s®æ§Y¥i.

²¤Æª©µ{¦¡½X¤º²Ä 7 ~ 8 ¦æ¤¤¶¡´¡¤J :
c =  ActiveSheet.UsedRange.Columns.Count
²Ä 8 ¦æ  Rows(r).Insert §ï¦¨ :

Range(Cells(r, 1), Cells(r, c)).Insert xlShiftDown
   ©Î
Cells(r, 1).Resize(, c).Insert xlShiftDown

§Y¥i.

TOP

ÁÂÁÂl¤j¡A
¤U©P¦A¬Ý¬Ý¥i¦æ§_?

TOP

§Ú·Q¡A¸ê®Æ¤ÓÃe¤j¤F¡A©Ò¥H¡Aª½±µ¥Î·Æ¹««ö¤U´¡¤J¥\¯à¡A¤]­nªá¤W´X¤Q¬í¡A¬Ý¨Ó»Pµ{¦¡µLÃö¡C
ÁÂÁ´£¨Ñ»yªk¡ã

TOP

        ÀR«ä¦Û¦b : ¡i®É¶¡¦¨´N¤@¤Á¡j®É¶¡¥i¥H³y´N¤H®æ¡A¥i¥H¦¨´N¨Æ·~¡A¤]¥i¥HÀx¿n¥\¼w¡C
ªð¦^¦Cªí ¤W¤@¥DÃD