deleting rows if they contain a value held in a separate list
On Apr 5, 1:21*am, wrote:
I have a list of codes in column A
I want to delete any rows from column A if they contain any codes that
appear in a list held on a separate tab.
Any help appreciated!
Hi,
You could do this with a macro or formulas and a set of steps. Which
is best probably depends on how often you need to do it.
To do it manually, use the following process (assuming your List on
sheet 1 spans Cols A:G and your list on sheet 2 is in the range A1:A50
- just for example).
1. In cell H2 of sheet 1 (next to your list) put the
formula: "=ISERROR(MATCH(A2,Sheet2!$A$1:$A$50,0))"
2. Fill down to the end of your list
3. Turn on Autofilter
4. In col H filter for 'False'
5. Select all the rows and delete them
6 Turn off Autofilter.
If this isn't appropriate, a macro can easily be concieved.
Cheers,
Ivan.
|