Need a little help from the Excel Guru's out there.
I have a VBA AutoFilter set up and it works except for 1 small problem. If the auto filter returns with no data how can I with the code I have tell it after TBL.Range.AutoFilter Field:=12, Criteria1:="Term" to skip everything and start back after EE.Range("A2:L" & LR).SpecialCells(xlCellTypeVisible).Delete?
LR = ThisWorkbook.Worksheets("Employees").Cells(Rows.Count, 1).End(xlUp).Row
TBL.Range.AutoFilter Field:=12, Criteria1:="Term"
EE.Range("A2:L" & LR).Copy
TERM.Range("A1").End(xlDown).Offset(1).PasteSpecial (xlPasteValues)
Application.DisplayAlerts = False
EE.Range("A2:L" & LR).SpecialCells(xlCellTypeVisible).Delete
TBL.AutoFilter.ShowAllData
I have a VBA AutoFilter set up and it works except for 1 small problem. If the auto filter returns with no data how can I with the code I have tell it after TBL.Range.AutoFilter Field:=12, Criteria1:="Term" to skip everything and start back after EE.Range("A2:L" & LR).SpecialCells(xlCellTypeVisible).Delete?
LR = ThisWorkbook.Worksheets("Employees").Cells(Rows.Count, 1).End(xlUp).Row
TBL.Range.AutoFilter Field:=12, Criteria1:="Term"
EE.Range("A2:L" & LR).Copy
TERM.Range("A1").End(xlDown).Offset(1).PasteSpecial (xlPasteValues)
Application.DisplayAlerts = False
EE.Range("A2:L" & LR).SpecialCells(xlCellTypeVisible).Delete
TBL.AutoFilter.ShowAllData