I am trying to delete rows where Col F = 0 or #N/A
I am getting a runtime error here now, but can't figure out exactly why yet....
Sub DPNext()
Dim LastRow As Long, x As Long
Range("A3:F22").Select
LastRow = Cells(Rows.Count, "F").End(xlUp).Row
For x = LastRow To 1 Step -1
If UCase(Cells(x, 6).Value) = "#N/A" Or _
UCase(Cells(x, 6).Value) = "0" Then
Rows(x).Delete
End If
Next
I am getting a runtime error here now, but can't figure out exactly why yet....
Sub DPNext()
Dim LastRow As Long, x As Long
Range("A3:F22").Select
LastRow = Cells(Rows.Count, "F").End(xlUp).Row
For x = LastRow To 1 Step -1
If UCase(Cells(x, 6).Value) = "#N/A" Or _
UCase(Cells(x, 6).Value) = "0" Then
Rows(x).Delete
End If
Next