K
Koz
I am trying to delete all rows where the value of one of the cells equals
zero, is there a formula for this?
zero, is there a formula for this?
Mike H said:Hi,
You didn't say which cell so this deletes the row if the cell in column A is
zero
Right click the sheet tab, view code and paste this in and run it
Sub mersible()
lastrow = Cells(Rows.Count, "A").End(xlUp).Row
For x = lastrow To 1 Step -1
If Cells(x, 1).Value = 0 Then
Rows(x).EntireRow.Delete
End If
Next
End Sub
Mike
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.