I am not sure why this is not working, I keep getting an error message for the following code:
Sub Delete_row_loop()
Dim Firstrow As Integer
Dim Lastrow As Integer
Dim Lrow As Integer
Sheets("Script").Select
Firstrow = 2
Lastrow = .Cells(.Rows.Count, "A").End(x1up).Row
For Lrow = Lastrow To Firstrow Step -1
With .Cells(Lrow, "D")
If Not IsError(.Value) Then
If .Value = "0" Then .EntireRow.Delete
End If
End With
Next Lrow
End Sub
The error message I keep getting is a Compile error: Invalid or unqualified reference.
Any information would be great.