Thank you very much. It worked great. I added a few more filters to the code and the macro runs fine except at the end I'm getting the message "No Data to Remove" when there was data that was moved. I'm not sure how to edit this line to appear only when there is no action performed.
Here is the revised code.....
Thank you again.
Sub MEALSANDENTERTAINMENT()
Application.ScreenUpdating = False
With Sheets("M&E").Cells(1).CurrentRegion
.Parent.AutoFilterMode = False
.AutoFilter 5, "Employee Expense"
If .Parent.Evaluate("subtotal(3," & .Columns("e").Address & ")") > 1 Then
.Offset(1).Copy Sheets("remove Concur & BMO").Cells(1)
.Offset(1).EntireRow.Delete
End If
.AutoFilter 5, "PETTY CASH"
If .Parent.Evaluate("subtotal(3," & .Columns("e").Address & ")") > 1 Then
.Offset(1).Copy Sheets("remove Concur & BMO").Cells(1)
.Offset(1).EntireRow.Delete
End If
.AutoFilter 5, "*BMO*"
If .Parent.Evaluate("subtotal(3," & .Columns("e").Address & ")") > 1 Then
.Offset(1).Copy Sheets("remove Concur & BMO").Cells(1)
.Offset(1).EntireRow.Delete
Else
MsgBox "No data to remove"
End If
ActiveSheet.ShowAllData
End With
Application.ScreenUpdating = True
End Sub
Bookmarks