I am trying to filter a list of properties based on multiple keywords (e.g. "Cool Interior," "Terrace/Patio"). Here's a basic interpretation:
The range I want to filter is on a sheet titled, "1," and spans from A2:O25. The range is a Protected Range, called "Properties_List." Each row represents a different property, where each column represents different information (Name, Region, Price, Size, etc.). In Column AA of sheet "1," I have a list of keywords for each property that are separated by commas. A sample cell in Column AA looks like this: Mountain, Lake, Terrace/Patio, Multi-Unit, Garden. The range in Column AA is a Protected Range, called "Filter_List," and spans from AA2:AA25.
[Note: Each row in "Filter_List" uses a "JOIN" function, which strings multiple selected keywords from Columns Q-Y. Each cell in Columns Q-Y contains dropdown boxes, where you can select one term out of 25-30 keywords.]
I have added a Code.gs script for a separate sheet, sheet "2." The same dropbox (as mentioned above) sits in cell A4 of sheet "2." From the script, the user can select a keyword from the dropbox in cell A4, and that selection will appear in cell B4. Additionally, the user can select more keywords, and the selections will appear (separated by commas) after the previous selection(s) in cell B4. After three separate selections, cell B4 would like this: Mountain, Garden, Lake
What I am struggling to do is this:
Filter "Properties_List" in cell A7 of sheet "2," based on the selections in cell B4 that match the text strings in the "Filter_List."
So, any property that contains the words "Mountain" AND "Garden" AND "Lake" within its corresponding cell in the "Filter_List," will show up in A7 (and down) on sheet "2."
In my attempt, I have also designated cells C36:H36 in sheet "2" to "grab" each selection in cell B4. So in our example above, cell C36 would show "Mountain," cell D36 "Garden," cell E36 "Lake" and cells F36:H36 would be blank.
I have used the following function in cell A7 of sheet "2":
=FILTER(Properties_List,REGEXMATCH(Filter_List,C36),REGEXMATCH(Filter_List,D36),REGEXMATCH(Filter_List,E36),REGEXMATCH(Filter_List,F36),REGEXMATCH(Filter_List,G36),REGEXMATCH(Filter_List,H36))
This kind of works? But not fully. What I have found is the function will also filter based on the order of the selections. In other words, only properties with a "Filter_List" string where "Mountain" came before "Garden" which came before "Lake" would remain. I want the filter to show a property where "Mountain," "Garden" and "Lake" (all three) are contained ANYWHERE in the string.
Does this make sense? At all? Haha. Thanks for any help, and please let me know if I am going about this all the wrong way!

