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

½Ð°Ý¥u­n¦b³æ¼ÆÀx®æ1,3,5.¡K51¼g¤J

½Ð°Ý¥u­n¦b³æ¼ÆÀx®æ1,3,5.¡K51¼g¤J

Sub a1()
    For x = 1 To 50
        Cells(x, 1) = "ai"
    Next x
End Sub
½Ð°Ý¥u­n¦b³æ¼ÆÀx®æ1,3,5.¡K51¼g¤J
­n«ç¼Ë¼g©O¡H
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

¦^´_ 1# ¦Û§Ú·Pı¨}¦n
µo²{¤@­Ó¦³½ìªº²{¶H
¥H¥»½d¨Ò¨Ó»¡
  1. Sub ex()
  2. Selection = "=IF(MOD(ROW(),2)=0,RC,""ai"")"   '¿ï¨ú½d³ò¼g¤J¤½¦¡
  3. Selection = Selection.Value  '¿ï¨ú½d³ò¤½¦¡Âন­È
  4. End Sub
½Æ»s¥N½X
¦pªG°õ¦æ¥H¤Wµ{¦¡½X¡A¥i¥H¹F¨ìÃþ¦ü¤Ä¿ï¿ï¶µ/­pºâ/¤ÏÂЭpºâªº®ÄªG¥i¥H±N°¸¼Æ¦Cªº­ì­È«O¯d
¦ý¬O¡A³v¦æ¥H¤Wµ{¦¡½X´N¤£¯à±N°¸¼Æ¦Cªº­ì­È«O¯d
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 6# ¦Û§Ú·Pı¨}¦n
还¬O¥i¥H¥h±¼Select¡A¦bVBA¤¤¨Ï¥ÎSelect©MActivate会¤j¤j­°§C执¦æ®Ä²v
  1. Sub a1()
  2.     For x = 1 To 802 Step 2
  3.     Application.ScreenUpdating = False
  4.     Cells(x, 1).ClearContents
  5.     Next x
  6.     Application.ScreenUpdating = True
  7. End Sub
½Æ»s¥N½X
¦V°ª¤â学习

TOP

¥»©«³Ì«á¥Ñ ¦Û§Ú·Pı¨}¦n ©ó 2013-2-20 16:46 ½s¿è

§ï¦¨³o¼Ë´N¤£·|¶Ã¸õ¤F¡C
3Q


Sub a1()
    For x = 1 To 802 Step 2
    Application.ScreenUpdating = False
    Cells(x, 1).Range("A1").Select
    Selection.ClearContents
    Next x
    Application.ScreenUpdating = True
End Sub
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

Step 2¤Ó¦n¥Î¤F
§Ú¤U­±ªºµ{¦¡¡A¤£¤Ó¦n¥Î¡A·|¸õ°Ê¼v¹õ¡A¦p¦ó§ïµ½¡K¡H


Sub a1()
    For x = 1 To 800 ...
¦Û§Ú·Pı¨}¦n µoªí©ó 2013-2-20 11:55




Application.DisplayAlerts = False'´£¥Ü°T®§®ø°£
Application.ScreenUpdating = False    '¿Ã¹õ§ó·s®ø°£

­Y¨Ï¥Î  Application.ScreenUpdating = False    '¿Ã¹õ§ó·s®ø°£
µ{¦¡«á­±¥²¶·±N¨ä¶}±Ò
Application.ScreenUpdating = True   '¿Ã¹õ§ó·s¶}¤ß

  ¦h°µ¦h·Q¦h¾Ç²ß¡A¤Ö¬Ý¤Ö¿ù¤Ö°g³~

  ¦h°µ=¦h¦h½m²ß¡A¦h¦h½s¼g¡C
  ¦h·Q=·Q·Q¬°¤°»ò¤H®aµ{¦¡­n¨º¼Ë¼g¡A¦pªG´«¦¨¦Û¤v¡A¤S·|«ç¼g¡C
  ¦h¾Ç²ß=¾Ç²ß¤H®aªºµo°Ý¨Ã¸Ñµª¡A¾Ç²ß¤H®aªº¼gªk

  ¤Ö¬Ý=¥u¬Ý¤£°µ¤]ªPµM

TOP

¦^´_ 3# ¦Û§Ú·Pı¨}¦n
  1. Sub a1()
  2.     For x = 1 To 800 Step 2
  3.     ActiveCell.Offset(2, 0).ClearContents
  4.     Next x
  5. End Sub
½Æ»s¥N½X
.Range("A1")这个¦ü¥G¬O¦h§E¥N码¡H¡H¡H
¦V°ª¤â学习

TOP

Step 2¤Ó¦n¥Î¤F
§Ú¤U­±ªºµ{¦¡¡A¤£¤Ó¦n¥Î¡A·|¸õ°Ê¼v¹õ¡A¦p¦ó§ïµ½¡K¡H


Sub a1()
    For x = 1 To 800 Step 2
    ActiveCell.Offset(2, 0).Range("A1").Select
    Selection.ClearContents
    Next x
End Sub
50 ¦r¸`¥H¤º
¤£¤ä«ù¦Û©w¸q Discuz! ¥N½X

TOP

  1. Sub a1()
  2. Dim x As Integer
  3.     For x = 1 To 51 Step 2
  4.         Cells(x, 1) = x
  5.     Next x
  6. End Sub
½Æ»s¥N½X
¦V°ª¤â学习

TOP

        ÀR«ä¦Û¦b : ÀR§¤±`®¦¤v¹L¡B¶¢½Í²ö½×¤H«D¡C
ªð¦^¦Cªí ¤W¤@¥DÃD