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

[µo°Ý] ½Ð±Ð¦p¦ó¤£¥Î FOR°j°é¡A§Ö³tªº§R±¼¯S©wªº¦C¡H

[µo°Ý] ½Ð±Ð¦p¦ó¤£¥Î FOR°j°é¡A§Ö³tªº§R±¼¯S©wªº¦C¡H

½Ð±Ð¦p¦ó¤£¥Î FOR°j°é¡A§Ö³tªº§R±¼¯S©wªº¦C©M¦h­Ó¯S©wªº¦C¡H
¥Ø«e¬O¨Ï¥Î  FOR °j°é¡A¦ý®É¶¡¤Óªø¡A¦³§ó¦n¡B§óÁo©úªº¤èªk¶Ü¡H
Intersect ¤èªk ¥i¥H¿ëªº¨ìªº¶Ü¡H¡H¡H

Sub ¬Ý«C¤ì()
AAA = Range("B65536").End(xlUp).Row
For x = 2 To AAA
d = Cells(x, 2)
     If Cells(x, 2) <> 1 Then '
        Rows(x).Delete
        x = x - 1
        AAA = Range("B65536").End(xlUp).Row
        If x >= AAA Then Exit For
     End If
Next x
End Sub
================================================
Sub ¬Ýªü¤[¬zµ¥¤­¤H()
AAA = Range("B65536").End(xlUp).Row
For x = 2 To AAA
d = Cells(x, 2)
     If Cells(x, 2) = 1 Or Cells(x, 2) = 3 Or Cells(x, 2) = 5 Or Cells(x, 2) = 7 Or Cells(x, 2) = 9 Then '
        Rows(x).Delete
        x = x - 1
        AAA = Range("B65536").End(xlUp).Row
        If x >= AAA Then Exit For
     End If
Next x
End Sub

ÁÂÁ«ü±Ð¡A·P®¦~~~¦U¦ì«e½ú~~¡I  :'(



°Ý°ÝÃD.rar (8.34 KB)

¥»©«³Ì«á¥Ñ yen956 ©ó 2014-5-24 04:49 ½s¿è

¦^´_ 1# ji12345678
§Úªº¤èªkÁÙ¬O¥Î For next
¦ý, ­Ë¹L¨Ó§R°£, ¥i¬Ù«Ü¦hµ{¦¡¦C, ¥i¬Ù¤@¨Ç®É¶¡
  1. Sub ¬Ý«C¤ì()
  2.     AAA = Range("B65536").End(xlUp).Row
  3.     For x = AAA To 2 Step -1
  4.         If Cells(x, 2) <> 1 Then '
  5.             Rows(x).Delete
  6.         End If
  7.     Next x
  8. End Sub
  9. '================================================
  10. Sub ¬Ýªü¤[¬zµ¥¤­¤H()
  11.     AAA = Range("B65536").End(xlUp).Row
  12.     For x = AAA To 2 Step -1
  13.     d = Cells(x, 2)
  14.     If d = 1 Or d = 3 Or d = 5 Or d = 7 Or d = 9 Then '
  15.         Rows(x).Delete
  16.     end if
  17.     Next x
  18. End Sub
½Æ»s¥N½X

TOP

¥»©«³Ì«á¥Ñ yen956 ©ó 2014-5-24 05:01 ½s¿è

¦^´_ 1# ji12345678 [
¥Î¦Û°Ê¿z¿ï¦p¦ó?
(¤S¥i«O¦³­ì¦³¸ê®Æ)

TOP

        ÀR«ä¦Û¦b : ¬Ý§O¤H¤£¶¶²´¡A¬O¦Û¤v­×¾i¤£°÷¡C
ªð¦^¦Cªí ¤W¤@¥DÃD