alphabo1201
New Member
- Joined
- May 2, 2019
- Messages
- 16
Hello Excel Gurus,
I am trying to filter exclude and deleting any rows but for some reason it is deleting all of the rows. Could someone help me?
the filter portion of the VBA works but its the deleting rows that is not working.... Thank you!!
Range("A1").AutoFilter Field:=13, Criteria1:="<>EXPENSES", Operator:=xlFilterValues
Application.DisplayAlerts = False
ActiveSheet.AutoFilter.Range.Offset(1, 0).Rows.SpecialCells(xlCellTypeVisible).Delete (xlShiftUp)
Application.DisplayAlerts = True
ActiveSheet.ShowAllData
I am trying to filter exclude and deleting any rows but for some reason it is deleting all of the rows. Could someone help me?
the filter portion of the VBA works but its the deleting rows that is not working.... Thank you!!
Range("A1").AutoFilter Field:=13, Criteria1:="<>EXPENSES", Operator:=xlFilterValues
Application.DisplayAlerts = False
ActiveSheet.AutoFilter.Range.Offset(1, 0).Rows.SpecialCells(xlCellTypeVisible).Delete (xlShiftUp)
Application.DisplayAlerts = True
ActiveSheet.ShowAllData