Currently, I'm using the following code to check column A in a certain range of cells for a #N/A value, and if found, I'm deleting that row.
With Sheets(Sheet)
For LRow = 45 To 29 Step -1
With .Cells(LRow, "A")
If (CVErr(.Value) = CVErr(xlErrNA)) Then .EntireRow.Delete
End With
Next LRow
End With
I need to extend this so I check all columns 1 through 10, rather than just A. I tried this slight modification (nesting another loop), but it doesn't work. Any suggestions?
With Sheets(Sheet)
For LRow = 45 To 29 Step -1
For LCol = 10 To 1 Step -1
With .Cells(LRow, LCol)
If (CVErr(.Value) = CVErr(xlErrNA)) Then .EntireRow.Delete
End With
Next LCol
Next LRow
End With