deleting rows using lists of names from another sheet... please he

  • Thread starter Thread starter laandmc
  • Start date Start date
L

laandmc

Is there a way to delete rows if they fit a condition?

For example:

Sheet 1 contains all the names.
Sheet 2 contains names I want to get rid of the whole row.
Sheet 3 what I want to end up with.

SHEET 1
A
B
C
D

SHEET 2
A
B

SHEET 3
C
D

Can anyone give me a step by step guide on how to do this please as I do not
know a lot on excel or visual basic.

Cheers
 
the simpiest way is to add an auxilary column to sheet 1 indicating which
rows to copy. Then filter on the auxilary column and copy the visible cells.
Here is step by step

1) in new column add the following to row 1

=COUNTIF(Sheet2!A$1:A$100,A1)

where first parameter is the table on sheet 2 with the names and A1 is the
location where the name is located on Sheet 1.

2) the items in the auliary column with a count of 0 are the ones you want
to copy

So highlight new auxilary column then go to menu Data - Filter - Autofilter

3) Now in Row one of the auxilary column select from the list 0. These are
the records yo want to copy

4) Copy rows that are visible and paste into new sheet
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top