Filter and delete from 5 worksheets

thedeadzeds

Active Member
Joined
Aug 16, 2011
Messages
445
Office Version
  1. 365
Platform
  1. Windows
Guys,


I have 5 worksheets all with tables of data. The worksheets and table names are as follows:


worksheet name = BA1 and the table name is tab1
worksheet name = BA2 and the table name is tab2
worksheet name = BA3 and the table name is tab3
worksheet name = BA4 and the table name is tab4
worksheet name = BA5 and the table name is tab5


Is there a way to filter by column D for all worksheets and delete all rows unless column 4 shows 'New Calls'. So filter all worksheets above based on column D and delete all data unless column D shows 'New Calls'. So essentially the only data showing in all 5 tables should be 'New Calls'.


Hope this makes sense
Thanks
 

Excel Facts

Save Often
If you start asking yourself if now is a good time to save your Excel workbook, the answer is Yes
Try turning on the Macro Recorder, and record yourself manually setting it up for one sheet.
That should give you bulk of the code you need to actually do what you want for each page.
Then, you can wrap it in a loop that loops through each worksheet, like this:
Code:
Dim ws as Worksheet
Application.ScreenUpdating = False
For Each ws in Worksheets
    ws.Activate
[I]    'your code here[/I]
Next ws
Application.ScreenUpdating = True

If you need any help cleaning things up, post your code here, and let us know what needs fixing.
 
Last edited:
Upvote 0

Forum statistics

Threads
1,216,101
Messages
6,128,835
Members
449,471
Latest member
lachbee

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top