okay.
so this is the sub being used.
Sub final()
Dim i&, x, cell As Range
Application.ScreenUpdating = 0
With Worksheets("Reason Codes")
x = .Range("a3").CurrentRegion
End With
Set dic = CreateObject("scripting.dictionary")
dic.CompareMode = 1
For i = 1 To UBound(x, 1)
dic.Item(Trim$(x(i, 2))) = Trim$(x(i, 1))
Next
With Worksheets("Modify Data")
On Error Resume Next
For Each cell In .Range("E3", .Cells(Rows.Count, "E").End(xlUp))
If dic.exists(CStr(cell.Value)) Then
cell.Offset(, 1) = dic.Item(CStr(cell.Value))
End If
Next
.Columns("F").Replace "#N/A", ""
.Range("F3", Cells(.Rows.Count, "F").End(xlUp)).SpecialCells(4).EntireRow.Delete
End With
Application.ScreenUpdating = True
End Sub
it is not deleting the items now.
Bookmarks