close
Is there a way to create a macro that will search a section of a worksheet
and delete rows that have a zero in the leading cell?
Thanks in advance!
Sub DeleteRowswithZeroInColumnA()
Dim lastrow as Long, i as Long
lastrow = cells(rows.count,1).End(xlup).Row
for i = lastrow to 2 step -1
if cells(i,1).Value = 0 then
rows(i).Delete
end if
Next
End Sub
--
Regards,
Tom Ogilvyquot;pywhacketquot; wrote:
gt; Is there a way to create a macro that will search a section of a worksheet
gt; and delete rows that have a zero in the leading cell?
gt;
gt; Thanks in advance!
全站熱搜