Delete filter data except header



'Delete filter data except header
Sub redfdf()

Sheets(1).Range("a1").Select
Selection.AutoFilter
Sheets(1).UsedRange.AutoFilter Field:=2, Criteria1:="Income"
Sheets(1).UsedRange.Offset(1, 0).SpecialCells(xlCellTypeVisible).Copy Sheets(2).Range("A2")
Sheets(1).UsedRange.Offset(1, 0).SpecialCells(xlCellTypeVisible).Select
Selection.EntireRow.Delete

End Sub

Comments

Popular posts from this blog

number format

send Mail by outlook from excel sheet

Find and copy the data