XL2000: ????? ??? ??????? ?? ?? ??... ?????? ????? ???? ??????

?????? ????????? ?????? ?????????
???? ???????: 213544 - ??? ???????? ???? ????? ????? ??? ???????.
??? ????? ??? ???????. ????? "??? ??" ??? ??? ??????? ??? ????.
?????? ??? ????? Microsoft Excel 2002 ?? ??? ???????? ???? 291300.
?????? ??? ????? Microsoft Excel 98 ?? ??? ???????? ???? 184378.
?????? ??? ????? Microsoft Excel 97 ?? ??? ???????? ???? 159915.
????? ???? | ?? ????

?? ??? ??????

??????

Microsoft Excel 2000 ???? ??????? ???????? ?? ?? ??... ?????? ???? ?????? ?????? ?? ??????? ?? Microsoft Excel ?????? ?? Excel 97.

???? ??? ??????? ?????????? ??? ??????? ??? ???? Visual Basic ??? ???? ?????? ??????? ??????? ???? ????? ??? ??????? ?? ????.

??????? ????

???? Microsoft ??????? ???????? ??? ??? ?? ???? ??????? ?? ?? ?????. ??? ????? ???? ?? ????? ??? ???????? ??????? ?????? ???????? ?? ???????? ???? ????. ????? ??? ??????? ???? ?????? ?? ??? ??????? ???? ??? ????? ?? ??????? ???? ??? ????????? ?????? ?????? ?????????. ???? ??????? ????? ??? Microsoft ??? ????? ????? ???? ???? ?? ?????? ?????? ??? ??????? ?????? ????? ?????? ?? ????? ??????? ?????? ??????? ?????.

????? ????????

???????? ??????? ?? ??? ?????? ???? ????? ???????? ?? ???? ???:
   A1:  a  B1:  1
   A2:  b  B2:  2
   A3:  x  B3:  3
   A4:  x  B4:  4
   A5:  c  B5:  5
   A6:  x  B6:  6
   A7:  d  B7:  7
   A8:  x  B8:  8
   A9:  x  B9:  9
   A10: e  B10: 10
				

????? ????

?? ?????? ????? ????? ???? ???? ??????? ??????:
Sub DeleteCells()

    'Loop through cells A1:A10 and delete cells that contain an "x."
    For Each c in Range("A1:A10")
        If c = "x" Then c.EntireRow.Delete
    Next

End Sub
				

???? ????? ????? ?? Microsoft Excel 2000

??? ????? ??????? DeleteCells ?? Microsoft Excel 2000 ??? ??? ?????? 3 ? 6 ? 8. ??? ????? ?? ?????? 4 ? 9 ??? "x" ?? ?????? A ? ?? ???? ??????? ??? ??????. ????? ??????? ?? Microsoft Excel 2000 ???????:
   A1: a   B1: 1
   A2: b   B2: 2
   A3: x   B3: 4
   A4: c   B4: 5
   A5: d   B5: 7
   A6: x   B6: 9
   A7: e   B7: 10
				
??? Microsoft Excel ??? ???? 3 ? ??? ???? ??????? ?? ???? ?????. ??? ???? ??????? ????? ?????? A3 ??????? ?????? A4 ? ????? ?????? A4 ??????? ?????? A5 ???. ??? ??? ??... ???? ?????? ????? ???? ?? ?????? ?????? ???????; ????? ????? ??? ????? ??????? ???? ?? ??? ???? ?????? ??????.

???? ????? ????? ?? Microsoft Excel 5.0 ? 7.0

??? ????? ??????? DeleteCells ?? Microsoft Excel 5.0 ? 7.0 ??????? ???? ???? ?????? ???? ????? ??? "x". ????? ??????? ?? Microsoft Excel 5.0 ?? 7.0 ???????:
   A1: a   B1: 1
   A2: b   B2: 2
   A3: c   B3: 5
   A4: d   B4: 7
   A5: e   B5: 10
				
??? ??? ???? 3 ??? ???? ??????? ???? ?????? ?? ????; ?????? A3 ????? ??????? ?????? A4 ? ?????? A4 ????? ??????? ?????? A5 ???.

??? ???? ????? ???? ?????? ?? Microsoft Excel 2000? ??? ??? ??... ?????? ???? ??? ????? ????? ?? Microsoft Excel 5.0 ? 7.0 ? ???? reevaluates ?????? ??? ?? ???? ?? ??????; ????? ?? ??? ???? ???????.

??????? ????????? ??? ??????? ???? ??? ??? ?????

?????? ??????? ?????? ????? ???? ??????? ???? ???? ???????:
Sub DeleteCells2()

    Dim rng As Range
    Dim i As Integer, counter As Integer

    'Set the range to evaluate to rng.
    Set rng = Range("A1:A10")

    'initialize i to 1
    i = 1

    'Loop for a count of 1 to the number of rows
    'in the range that you want to evaluate.
    For counter = 1 To rng.Rows.Count

        'If cell i in the range contains an "x",
        'delete the row.
        'Else increment i
        If rng.Cells(i) = "x" Then
            rng.Cells(i).EntireRow.Delete
        Else
            i = i + 1
        End If

    Next

End Sub
				
????? ??? ??????? ?? Microsoft Excel 2000 ?????????? ??????? ???????:
   A1: a   B1: 1
   A2: b   B2: 2
   A3: c   B3: 5
   A4: d   B4: 7
   A5: e   B5: 10
				

????? ?????? ??? ??????? ???? ??? ??? ?????

??? ????? ???? ??? ??????? ??????? ?????. ??? ???? ??? ???????.
Sub DeleteCells3()

    Dim rng As Range, i As Integer

    'Set the range to evaluate to rng.
    Set rng = Range("A1:A10")

    'Loop backwards through the rows
    'in the range that you want to evaluate.
    For i = rng.Rows.Count To 1 Step -1

        'If cell i in the range contains an "x", delete the entire row.
        If rng.Cells(i).Value = "x" Then rng.Cells(i).EntireRow.Delete
    Next

End Sub
				

?????

?????? ??? ???? ?? ????????? ??? ????? ??????? ?? ????? ?? ???? Visual Basic ???? ??? "??????? Microsoft Visual Basic" ?? ??????? ??????? ? ???? ????? ??????? ThroughCode ?? ????? Office "??" ????? ??????? ?? ???? ??? ??? ???? ???????.

???????

???? ???????: 213544 - ????? ??? ??????: 11/???? ??????/1435 - ??????: 4.2
????? ???
  • Microsoft Excel 2000 Standard Edition
????? ??????: 
kbnosurvey kbarchive kbmt kbdtacode kbhowto kbprogramming KB213544 KbMtar
????? ????
???: ??? ????? ??? ?????? ???????? ?????? ????? ???? ????? ?????????? ????? ?? ????????? ?????? ????. ???? ???? ?????????? ???? ?? ???????? ???????? ?????? ????????? ????? ????????? ???????? ????? ???????? ?????? ?? ?????? ??? ?? ???????? ???????? ?? ????? ??????? ?????? ??? ??????? ?????? ??. ?????? ?? ???? ??? ??????? ???????? ????? ?? ???? ????? ?????? ??? ????? ??? ????? ??????? ?? ????? ?? ?????? ??? ??? ??????? ??????? ?? ????? ????? ????? ????? ?????. ?? ????? ???? ?????????? ??????? ??? ????? ?? ??????? ?? ????? ?????? ?? ??? ????? ?? ????? ??????? ?? ???????? ?? ??? ???????. ???? ???? ?????????? ???????? ??? ????? ?????? ??????? ??????
???? ??? ????? ??????? ?????? ??????????213544

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com