Autofilter with 2+ cell references with "or" and "contains"

charliebigpot

New Member
Joined
Aug 20, 2019
Messages
1
Hi there, I'm a long time listener (reader) first time caller (writer).

I have scanned through dozens of forums and topics but can't seem to find a working solution for this challenge:
I have a table with multiple rows where I'm trying to autofilter a specific column based on 2+ inputs in specific cells based on "contains" and "or".


ABCDEFG
1Filter (the way I built it is that B2-B6 are auto populated based on a dropdown selection in a different sheet - if only one item is selected in the dropdown, only one will show up here, if all are selected in the dropdown, all show up here underneath eachother)
2Tomato
3Stones
4Melon
5Avocado
6Trees
7
8StepConcatenated
9Step1
TomatoStonesMelonAvocadoTrees

<tbody>
</tbody>
TomatoStonesMelonAvocadoTrees
10Step2TomatoMelonAvocadoTreesTomatoMelonAvocadoTrees
11Step3StonesStones
12Step4TomatoStonesMelonAvocadoTreesTomatoStonesMelonAvocadoTrees
13Step5AvocadoTreesAvocadoTrees

<tbody>
</tbody>

If I pick only "stones" it should autofilter "concatenated" on step1/3/4.
If I pick "tomato", "stones" and "melon" it should autofilter "concatenated" on step1/2/3/4 since it's an "or" and "contains" condition.

Does this make sense? I tried to re-think the structure but can't come up with a better solution than concatenating since I want to use "or" and "contains".

Thanks to anyone who makes the time to read through all of this.
 

Excel Facts

How to total the visible cells?
From the first blank cell below a filtered data set, press Alt+=. Instead of SUM, you will get SUBTOTAL(9,)
If each of your columns has a unique header then you could use SQL in Excel VBA to copy the rows that met your requirements to another sheet.
 
Upvote 0

Forum statistics

Threads
1,214,515
Messages
6,119,974
Members
448,934
Latest member
audette89

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