Autofilter Help Filtering Multiple Values in one column and applying filter in another colum

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.

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?
 

Excel Facts

Lock one reference in a formula
Need 1 part of a formula to always point to the same range? use $ signs: $V$2:$Z$99 will always point to V2:Z99, even after copying
Glad to hear you got the solution.

If you would like to post the solution then it is perfectly fine to mark your post as the solution to help future readers. Otherwise, please do not mark a post that doesn't contain a solution.
 
Upvote 0
Sorry about that, so the solution was to just have them deleted. Not technically a solution, but after relooking at the data and where it was going I realized that I did not need to keep that data at all so I just added a code to delete the data.
 
Upvote 0

Forum statistics

Threads
1,215,523
Messages
6,125,323
Members
449,218
Latest member
Excel Master

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top