I am trying to write a VBA that deletes the Row if column U = "Delivered". Column U is an index/match function pulling from another workbook and I've added the text function but I still keep running into the same error of no match. Any additional conversions I put into the VBA really slows down the running of it because it is going from line to line and there are like 40,000 lines. Is there a better way I could be doing this.Here is that code below and a sample file attached.
Sub deleteRows()
Dim lastRow As Long
Dim i As Long
lastRow = Cells(Rows.Count, "U").End(xlUp).Row
For i = lastRow To 1 Step -1
If Cells(i, "U").Value = "Delivered" Then
Rows(i).Delete
End If
Next i
End Sub
Bookmarks