Hello, could some one please help modify my code to do the following:
I am trying to create a loop that will only loop through worksheets named: E-1, E-2 and E-7 only in my Excel 2003 workbook (attached with dummy data).
The AutoFilters for each of these worksheets: E-1, E-2, E-3, E-7, E-9, E-11 are switch on and have filters applied.
Upon each iteration of looping through the macro, the following line of code is executed. This code works fine for the first iteration loop, however I the following iterations to paste the filtered data to worksheet named: 1 Mth in the last cell (so that the data is appended).
I do not know how to make this happen 
So if some one could please help me modify my macro and make it so that the data is appended in worksheet named 1 Mth, then it would be greatly appreciated.
Kind regards,
Chris 
Destination:=Worksheets("1 Mth").Range("A101")
Sub Test2()
'
'
Dim ProcessWS As Boolean
Dim ws As Worksheet
ProcessWS = False
Set ws = Worksheets("E-1").Select
For Each ws In ThisWorkbook.Worksheets
If ws.Name = "E-1" Then ProcessWS = True
If ws.Name = "E-2" Then ProcessWS = True
If ws.Name = "E-7" Then ProcessWS = True
If ws.Name = "E-3" Then ProcessWS = False
If ws.Name = "E-9" Then ProcessWS = False
If ws.Name = "E-11" The ProcessWS = False
If ProcessWS Then
With ActiveSheet.AutoFilter.Range
On Error Resume Next
Set rng2 = .Offset(1, 0).Resize(.Rows.Count - 1, 1) _
.SpecialCells(xlCellTypeVisible)
On Error GoTo 0
End With
If Not rng2 Is Nothing Then
Set rng = ActiveSheet.AutoFilter.Range
rng.Offset(1, 0).Resize(rng.Rows.Count - 1).Copy _
Destination:=Worksheets("1 Mth").Range("A101")
End If
End If
Next
End Sub
Bookmarks