Need help here.
I am using the below coding where i want to delete entire row contains #N/A, though i am bale to delete but it deletes one by one line which is time consuming.
i want that it select all the #N/A and delete in one go with in the range.
Sub RemoveNA ()
Dim ws As Worksheet
For sh = 1 To Worksheets.Count
Set ws = Worksheet (sh)
ws.Activate
LR= ws.Cells(Rows.count,"B").End(xlUp).Row
If ws.Name <> "Temp" Then
For i = LR To 2 Step -1
If Cells(i, "B").Text="#N/A" Then
Rows(i).EntireRows.Delete
End If
Next i
Next sh
End Sub
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…