I've inserted a macro to identify the shipping code in column "B" and if the code is "MRO" Or "RCP" Or "SHP" then it should delete the entire row. The macro is working fine however, the circumstances make it inadequate. I need help in identifying all the repetitions of the part# listed in column "A" that either of the 3 shipping codes would identify and delete all of those rows.
Example: One part number (X123) in column A could be listed several times in that column and the corresponding shipping status in column B would change perhaps six to ten times prior to its arrival. If one of those codes in column B is MRO, RCP, or SHP; then I want every occurrence of that part#'s row deleted.
My current macro only deletes a specific occurrence and is listed below:
Dim Last As Long
Last = Cells(Rows.Count, "E").End(xlUp).Row
For i = Last To 1 Step -1
If Cells(i, "B").Value = "MRO" Or "RCP" Or "SHP" Then
Cells(i, "B").EntireRow.Delete
End If
Next I
Could anyone assist with modifying the macro to find every occurrence of the part number in column A and delete the entire row??
Thanks JB
Example: One part number (X123) in column A could be listed several times in that column and the corresponding shipping status in column B would change perhaps six to ten times prior to its arrival. If one of those codes in column B is MRO, RCP, or SHP; then I want every occurrence of that part#'s row deleted.
My current macro only deletes a specific occurrence and is listed below:
Dim Last As Long
Last = Cells(Rows.Count, "E").End(xlUp).Row
For i = Last To 1 Step -1
If Cells(i, "B").Value = "MRO" Or "RCP" Or "SHP" Then
Cells(i, "B").EntireRow.Delete
End If
Next I
Could anyone assist with modifying the macro to find every occurrence of the part number in column A and delete the entire row??
Thanks JB