automating delection of certain rows
Hi Sam;
This code assumes that every cell starting in cell A1 and
going down has something in it for every line and then
deletes the row if you want to check the cells in column D
Sub DeleteTheZeros()
Range("A1").Select
While Not ActiveCell = ""
'checks for the zero value 3 columns to the right
of column A
If ActiveCell.Offset(0, 3) = 0 Then
Application.DisplayAlerts = False
ActiveCell.EntireRow.Delete
End If
ActiveCell.Offset(1, 0).Select
Wend
End Sub
Thanks,
Greg
-----Original Message-----
I am trying to automate through a Macro the operation
where all rows in a worksheet with a value of 0 (zero)
will be deleted. how may I accomplish this?
.
|