I want to create columns of category filters, and then determine for each cell which column it fits with. Consider this table:
| A | B | C | D | E | |
|---|---|---|---|---|---|
| 1 | Text | Category | Soda | Coffee | Tea |
| 2 | I'd like a pepsi with my food. | pepsi | cappuccino | matcha | |
| 3 | The matcha is not my favorite. | fanta | espresso | tea | |
| 4 | Do you want a cappuccino? | macchiato | mint | ||
| 5 | I want steak. |
When it does searches for which column matches, it fills in Column B like this. Notice that it finds "tea" inside "steak" too:
| B | |
|---|---|
| 1 | Category |
| 2 | Soda |
| 3 | Tea |
| 4 | Coffee |
| 5 | Tea |
I tried using SEARCH and REGEXMATCH but couldn't figure it out.
Note that this is different than this question since that's asking for if the entire value of Column A is in another column, whereas I'm asking for just a portion to match.