I have problem with Entirerow.Delete
.
Sometimes my macro deletes all rows from the worksheet and sometimes it is going back to the last error handling and skipping order.
I tried to filter values, assign them to the range and delete the range, but it took about 20 minutes for program execution, so I had to kill processing.
wb_current.Worksheets("RH").Range("A6:V6").AutoFilter Field:=22, Criteria1:=Array("#N/A", ""), Operator:=xlFilterValues
With wb_current.Worksheets("RH")
lng_last_row_main = .Cells(Rows.Count, 1).End(xlUp).Row
If lng_last_row_main > 6 Then
.Rows("7:" & lng_last_row_main).EntireRow.Delete
End If
.AutoFilterMode = False
lng_last_row_main = .Cells(Rows.Count, 1).End(xlUp).Row
End With
I would like to have a filter set to show me rows with blank or NAs in specific column, then delete those rows containing those values, then set off filter and get table without blank rows.