Autofilter with multiple criterias from a single cell

Ernest_PLM

New Member
Joined
Feb 13, 2013
Messages
2
Hi,

I have a spreadsheet that that I am trying to run a macro that does an Autofilter on a range Sheets("Criteria").Range("A1:L2").

Here is the VBA code that does the autofilter:

Sheets("Source").Range("A1:L108784").AdvancedFilter Action:=xlFilterCopy, _
CriteriaRange:=Sheets("Criteria").Range("A1:L2"), CopyToRange:=Range("A1") _
, Unique:=False

What i would like to do is have the value in Sheets("Criteria") Cell D2 & H2 to be able to have multiple criteria. I have tried putting "=or("text1","Text2")" in the cell as other forums have suggested but this doesn't work.

Am i able to do this and if so how?
 

Excel Facts

Can you AutoAverage in Excel?
There is a drop-down next to the AutoSum symbol. Open the drop-down to choose AVERAGE, COUNT, MAX, or MIN

Forum statistics

Threads
1,213,484
Messages
6,113,927
Members
448,533
Latest member
thietbibeboiwasaco

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