I need a MACRO (as I have a spreadsheet with 50k lines+ on (Sheet 1, which has data from Column A to AC (some rows may have blank cells anywhere between the two columns.
There are multiple rows that have the same reference number
In Sheet2
So, the MACRO runs, and deletes any row whos value is NOT 10001 or 10004
(Deletes Rows 5 6 7 (10002 and 10003 values)
There are multiple rows that have the same reference number
(Main Sheet - Sheet1) | Column A | Column B | Column C | .... Column AC |
Row 1 | ID | Data_1 | Data_2 | Data_27 |
Row 2 | 10001 | efaf | sf | fssdf |
Row 3 | 10001 | dfsads | tyrttfg | gfdgfsg |
Row 4 | 10001 | sdfs | rutr | f |
Row 5 | 10002 | dfssdf | ffsdagh | gas |
Row 6 | 10003 | wrefrf | fefasf | |
Row 7 | 10003 | ffae | ||
Row 8 | 10004 | fewaef | sadfadsf | asfdasfd |
In Sheet2
Sheet2 | |
ID (Column A) | |
10001 | |
10004 |
So, the MACRO runs, and deletes any row whos value is NOT 10001 or 10004
(Deletes Rows 5 6 7 (10002 and 10003 values)