Delete rows containing "ISA" in column A only, starting from row 6
Hi
The code below would be one way to do it
Option Explicit
Dim MyCell, MyRng As Range
Dim LstRow As Integer
Private Sub CommandButton1_Click()
LstRow = [A65535].End(xlUp).Row
Set MyRng = Range("A6:A" & LstRow)
For Each MyCell In MyRng
If MyCell.Value = "ISA" Then
MyCell.EntireRow.Delete
End If
Next MyCell
End Sub
hope this helps
S
|