You are on page 1of 3

Decided Processed

Winston y 23 12/12/2011 y
Ken y 12 12/14/2011 n
John y 7 12/12/2011 y
Janet n 65 10/23/2011 n
Ann y 4 10/12/2011 y
Brian n 76 10/10/2010 n
Kof y 12 12/14/2011 n
kkk y 13 2/11/2010 n

Sub Filter_Copy()
Dim lastrow As Long

Application.ScreenUpdating = False
With Sheets(1)
.AutoFilterMode = False
lastrow = Range("a" & Rows.Count).End(xlUp).Row
.Range("A1:E" & lastrow).AutoFilter field:=5, Criteria1:="n"
.Range("A1:E" & lastrow).AutoFilter field:=2, Criteria1:="y"
Sheets(2).Cells.Clear
lastrow2 = Sheets(2).Cells(Rows.Count, "A").End(xlUp).Row
'.Range("A1:D" & lastrow - 1).Offset(1, 0).SpecialCells(xlCellTypeVisible).Copy She
.Range("A2:D" & lastrow).Copy Sheets(2).Range("A" & lastrow2)
'.AutoFilterMode = False
End With
Application.ScreenUpdating = True
End Sub
ells(xlCellTypeVisible).Copy Sheets(2).Range("A" & lastrow2)
A" & lastrow2)
Ken y 12 12/14/2011
Kof y 12 12/14/2011
kkk y 13 2/11/2010

You might also like