Forgive me if the answer to this is in a different thread, but I have been searching and have been unable to find what I am looking for.
What I am trying to do is compare the results of a scan that are in a workbook to a list of items to disregard based on the contents of a cell in each workbook and if they match then delete that row. If I were to try to write it out in "pseudocode" I believe it would be something like this:
If ([current workbook][sheet1][cellF2] = [path to workbook 2][sheet1][Any Cell in Column B]), then delete [current workbook][sheet1][row 2]
Do this for all rows
current workbook = scan results
Workbook 2 = findings to disregard
Once I have the code that would accomplish this, I would like to put it in a macro that would check all rows in the scan results workbook. So the process would be something like this:
If workbook 1.sheet 1.F2 =workbook 2.sheet 1.any cell in column B, delete row 2, If no match do nothing and move to next row
If workbook 1.sheet 1.F3 =workbook 2.sheet 1.any cell in column B, delete row 3, If no match do nothing and move to next row
If workbook 1.sheet 1.F4 =workbook 2.sheet 1.any cell in column B, delete row 4, If no match do nothing and move to next row
If workbook 1.sheet 1.F5 =workbook 2.sheet 1.any cell in column B, delete row 5, If no match do nothing and move to next row
If workbook 1.sheet 1.F6 =workbook 2.sheet 1.any cell in column B, delete row 6, If no match do nothing and move to next row
If workbook 1.sheet 1.F7 =workbook 2.sheet 1.any cell in column B, delete row 7, If no match do nothing and move to next row
etc, etc.
Any help will be greatly appreciated.
I am very green when it comes to vba so please be gentle!
Bookmarks