Excel: Find match in list if match skip no match delete row


Hi I have a large list of parts that has duplicates and that's OK but I need to look at the part numbers on sheet2 and see if it is in sheet1. if in sheet one leave it alone if not in sheet 1 delete row. is there a fast way of doing this I am using 2016 excel VBA. here is my current code Do Until IsEmpty(ActiveCell) SearchItem = UCase(Trim(ActiveCell.Text)) OriginalSheet.Select Range("A14").Select Do Until ActiveCell.Value = SearchItem Or IsEmpty(ActiveCell) ActiveCell.Offset(1, 0).Select Loop If ActiveCell.Value = SearchItem Then If IsEmpty(ActiveCell.Offset(0, 4)) Then Sheets("Current Price").Select ActiveCell.Offset(1, 0).Select Else Sheets("Current Price").Select ActiveCell.EntireRow.Delete End If Else Sheets("Current Price").Select ActiveCell.EntireRow.Delete End If Loop


This question generated 15 answers. To proceed to the answers, click here.

This thread is current as of April 07, 2017.


For more resources for Microsoft Excel