jamesdean1379
Board Regular
- Joined
- Jun 11, 2014
- Messages
- 55
So I am trying to add a code to a macro to filter out 2 values in one column and add another filter to another column to filter out a couple of values. I do not get any errors when running the code, but it returns with everything filtered out instead of the values I put in the code.
What I am trying to do is filter out Customer Pick Up and HOLD AT PORT(this one will sometimes have a space at the end) in column J1 so they do not show up and then in column AI filtering out HOLD @ PORT and HOLD AT PORT so they do not show as well. Any insights on what I did wrong and how to correct or a better way to accomplish this?
VBA Code:
With Sheets("Inventory")
If .FilterMode = True Then .ShowAllData
.Range("J1").AutoFilter 10, "Customer Pick Up *", xlOr, "HOLD AT PORT *"
.Range("AI1").AutoFilter 10, "HOLD @ PORT *", xlOr, "HOLD AT PORT *"
End With
What I am trying to do is filter out Customer Pick Up and HOLD AT PORT(this one will sometimes have a space at the end) in column J1 so they do not show up and then in column AI filtering out HOLD @ PORT and HOLD AT PORT so they do not show as well. Any insights on what I did wrong and how to correct or a better way to accomplish this?