If Application.WorksheetFunction.CountIf(.Rows(lRow), "Bought") = 0 Then .Rows(lRow).delete
' Delete each row if the value "Bought" not exist in the row (It will look in the whole row)
Right now I am using this to remove any row that doesn't contain the word Bought in it.
The problem I have encountered is that some of the rows that contain Bought, also contain Cancelled, and they are still making it though the filter and causing problems.
I need to make it so that the row must contain both "Processed" and "Bought" in order to not be deleted, and if it contains "cancelled" and "bought", get rid of it.
Thanks!
' Delete each row if the value "Bought" not exist in the row (It will look in the whole row)
Right now I am using this to remove any row that doesn't contain the word Bought in it.
The problem I have encountered is that some of the rows that contain Bought, also contain Cancelled, and they are still making it though the filter and causing problems.
I need to make it so that the row must contain both "Processed" and "Bought" in order to not be deleted, and if it contains "cancelled" and "bought", get rid of it.
Thanks!