Removing items from worksheet by account number question

L

LiveUser

I need to remove everything that is related to one account number and so on
for other account numbers is there a way to do this or a way to highlight
them...

Thank you.
 
L

LiveUser

1st worksheet (Master) - I want to delete from Master
A B>H
Account 1 Data
Account 1 Data
Account 1 Data
Account 2 Data
Account 3 Data
Account 3 Data
Account 3 Data
Account 3 Data

2nd worksheet (Accounts to be deleted)

A
Account 1
Account 3
Account 7
Accoun 25
Account 100



Thank you.
 
B

Bernard Liengme

I will assume on Sheet1 (Master) the top row has labels (account, etc)
I will assume on Sheet2 the account numbers are in column A
On the Master sheet, insert a new column A; label it Code
In A2 enter the formula =COUNTIF(Sheet2!A:A,B2)
Copy down the column (quickest way is to double click the fill handle -
small solid square in lower right corner of select cell)
Accounts that are NOT to be deleted with have 0, the others will have 1 in
the Code column
Select all the data on the Master sheet and use Data | Sort, sort by the
Code
Now you can readily delete all the rows with 1 in column A.
when this is done you may delete column A
best wishes
 

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

Top