In a workbook I have multiple worksheets. In each worksheet there is column called status. I want to create a macro that will filter each worksheet so it only returns rows where status 404 or 12007 are shown. If there is no status 404 or 12007 within the worksheet then the worksheet will just be left blank.
I then want to create a second macro that will perform this task on all the sheets in the workbook at once by using something like the following code:
I tried to create a macro using a filter but the problem is that it does not work when the worksheet does not contain contain a 404 or 12007.
Any help on what I need to do to create this macro would be greatly appreciated.
I then want to create a second macro that will perform this task on all the sheets in the workbook at once by using something like the following code:
Code:
Sub Status404and12007FilterAll()
Dim wsheet As Worksheet
For Each wsheet In ActiveWorkbook.Worksheets
Sheets(wsheet.Name).Select
Status404and12007Filter
Next wsheet
End Sub
Any help on what I need to do to create this macro would be greatly appreciated.