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

Delete°ÝÃD

Delete°ÝÃD

Hi~µ{¦¡¦p¤U, ½Ð°Ý¤£ª¾¹D¬°¤°»ò°õ¦æ¹L¤@¦¸, ¤´µM·|¦³²M¤£°®²bªºª¬ªp, ¸ê®Æ¤j¬ù1~3¸Uµ§, ¬O­þ¸Ì¥X¤F°ÝÃD? ©Î¬O¥ý¶i¦³¤ñ¸û¦nªº¤èªk¥i¥H«ü¾É¤@¤U:'(
Sub jj()
m = Sheets("Temp1").Range("A1").CurrentRegion.Rows.Count
For i = 2 To m
If Sheets("Temp1").Cells(i, 14).Value = "abc" Then Rows(i).Delete Shift:=xlUp
Next
End Sub
ªì¾ÇªÌcolor

¦^´_ 1# color790


   For i = m To 2 step -1
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

¦^´_ 2# Hsieh

ÁÂÁ¦^´_, ½Ð°Ý¬°¤°»ò·|¦³³o¼Ëªº®t§O©O?
ªì¾ÇªÌcolor

TOP

¦^´_ 3# color790


i=2 to m,±q¤W©¹¤U§R¡A·|¦³Àx¦s®æ¤W²¾ªº±¡§Î¡A
°²¦p(3,14)¸ò(4,14)³£¬Oabc¡A¦Ói°õ¦æ¨ì3®É¡A·|¥ý§â(3,14)§R±¼¡AµM«á­ì¥»ªº(4,14)¨ú¥N¦¨(3,14)¡A
¥i¬O¦¹®Éi¤w¸gÅܦ¨4¤F¡A¥L´N¤£·|¦A¥h§R(3,14)ªº¨º­Óabc¤F¡A´N·|µo¥Í²¨º|ªº±¡§Î¡C
©Ò¥H­n¥Î­Ë¦^¨Óªº¤è¦¡¡C

TOP

¦^´_ 3# color790
³o°ÝÃD½×¾Â¦³°Q½×¨ì
  1. Option Explicit
  2. Sub Ex()
  3.     Dim i
  4.     For i = 1 To 10
  5.         Cells(i, "a").Select   'µøµ¡½Õ¾ã¦¨¹Ï¥Ü,¬Ý¬Ý¦ì¸mÅܤÆ
  6.         Cells(i, "a").Delete
  7.     Next
  8. End Sub
½Æ»s¥N½X
·P®¦ªº¤ß......(¦b³Â»¶®a±Ú°Q½×°Ï.¥Î¤ß¾Ç²ß·|¦³¶i¨Bªº)
¦ý¸ê·½µL­­,«á´©¦³­­,  ¤@¤Ñ1¤¸ªºÃÙ§U,¤H¤H¦³¯à¤O.

TOP

¦^´_ 4# owen06

Àò¯q¨}¦h, ·PÁÂ2¦ìªº¦^ÂÐ, ÁÂÁÂ~~~
ªì¾ÇªÌcolor

TOP

¥»©«³Ì«á¥Ñ luhpro ©ó 2013-11-19 22:27 ½s¿è

¦^´_ 6# color790

³oÃä´£¥X¤@ÂI : ¨ä¹ê­n±q¤W¨ì¤U¨Ì§Ç§R¦C¤]¬O¨S°ÝÃDªº,
¥u»Ý­n°t¦X Do...While ¨Ã©ó§R¦C®É¤£°µ»¼¼W¦C¸¹ªº°Ê§@§Y¥i,
¬Æ¦Ü³o¼Ëªº¤è¦¡³s¸ê®Æ¥½¦C³£¤£¥Î¹w¥ý­pºâ¬O²Ä´X¦C,
¥B§R§¹·í¤U§Y¥i³z¹L (¦C¸¹´î¤@) ±oª¾³Ñ¾l¸ê®Æµ§¼Æ.

Sub jj()
i = 2
With Sheets("Temp1")
  Do While .Cells(i, 1) <> ""
    If .Cells(i, 14) = "abc" Then
      Rows(i).Delete Shift:=xlUp
    Else
      i = i + 1
    End If
  Loop
End With
Msgbox "¸g¹L¿z¿ï, ³Ñ¾l¸ê®Æ¦@ " & i-1 & " µ§"
End Sub

TOP

        ÀR«ä¦Û¦b : ¦h°µ¦h±o¡C¤Ö°µ¦h¥¢¡C
ªð¦^¦Cªí ¤W¤@¥DÃD