ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   New Users to Excel (https://www.excelbanter.com/new-users-excel/)
-   -   Removing items from worksheet by account number question (https://www.excelbanter.com/new-users-excel/165456-removing-items-worksheet-account-number-question.html)

LiveUser

Removing items from worksheet by account number question
 
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.

Bernard Liengme

Removing items from worksheet by account number question
 
You need to tell us how the data is set out
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"LiveUser" wrote in message
...
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.




LiveUser

Removing items from worksheet by account number question
 
1st worksheet (Master) - I want to delete from Master
A BH
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.

"Bernard Liengme" wrote:

You need to tell us how the data is set out
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"LiveUser" wrote in message
...
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.





Bernard Liengme

Removing items from worksheet by account number question
 
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
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"LiveUser" wrote in message
...
1st worksheet (Master) - I want to delete from Master
A BH
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.

"Bernard Liengme" wrote:

You need to tell us how the data is set out
--
Bernard V Liengme
Microsoft Excel MVP
www.stfx.ca/people/bliengme
remove caps from email

"LiveUser" wrote in message
...
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.








All times are GMT +1. The time now is 07:14 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com