View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.programming
Bob Phillips[_6_] Bob Phillips[_6_] is offline
external usenet poster
 
Posts: 11,272
Default Modify to delete row

Hi Pat,

LastRow = Cells(Rows.Count, "AJ").End(xlUp).Row
For i = LastRow To 1 Step -1
If Cells(i, "AJ").Value = "1" Then
Cells(i, 1).Range("B1").Entirerow.Delete
End If
Next


--

HTH

RP
(remove nothere from the email address if mailing direct)


"Pat" wrote in message
...
LastRow = Cells(Rows.Count, "AJ").End(xlUp).Row
For i = LastRow To 1 Step -1
If Cells(i, "AJ").Value = "1" Then

Cells(i, 1).Range("B1").ClearContents

End If
Next


The above will clear content only, what change is needed to delete the
entire row.

Pat