i have a number of rows in a worksheet and most of the cells in each row has a formula that returns the value 0.
i need to delete the entire row if the cell in column A of the row is 0.
my search has brought me to the code below, that also does not work.
i need to delete the entire row if the cell in column A of the row is 0.
my search has brought me to the code below, that also does not work.
Code:
Dim LastRow As Long
Dim i As Long
last = Cells(Rows.Count, "A").End(xlUp).Row
'Delete rows
For i = last To 2 Step -1
If (Cells(i, "A").Value) = 0 Then
Cells(i, "A").EntireRow.Delete
End If
Next i
[code]
any help will be greatly appreciated