Removing items from worksheet by account number question

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

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.
 
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.
 
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
 
Back
Top