Example: I have a list of 100 names on sheet1 along with other data in other columns (A - date, B - number, C - address. D - first name, E - middle name, F- last name). and a smaller list of 10 names (A - first name, B - middle name, C - last name) on sheet2. All the names on sheet2 are considered "exceptions" and as such I use the following code to remove every row where the instance of each of them appear on sheet1.
However, the code only works based on one criteria in one column i.e. the name in column D. What I need it to do is to work based on three criteria over three columns e.g. instead of just deleting every row in Column D of sheet1 where "John" appears, I need it to identify and delete every row where "John" appears in Column D, AND "Peter" in Column E, AND "Smith" in Column F. So three columns and three criteria to be met before the row is deleted. If "all three names" "in the same order" as they appear on sheet2 two are not present then the row is not deleted.
The code below searches the full row to find "John" rather than specifying a specific row. I hope a codemaster can help.
Please Login or Register to view this content.
Bookmarks