TL;DR: Using SEARCH(search_for, text_to_search)
, "search_for
" is a variable-length array.
On Google Sheets, I have four cells, E1:E4. The values in each cell are as follows:
| E | --+------------+ 1 |Tim | 2 |Frank | 3 |Tim, Frank | 4 |Jennifer | --+------------+
I also have an array, which we'll call ARRAY1. The value of ARRAY1 is {Tim; Frank}
.
What I'm looking for is a formula that will give me a boolean value that tells me whether or not the E cell contains any of the values from ARRAY1. In the current example, it should return {TRUE; TRUE; TRUE; FALSE}
. This will then be used in a FILTER formula.
I have a nice little formula that works great if ARRAY1 contains 1 value (ie is not an array):
=arrayformula(isnumber(search(ARRAY1,E1:E4)))
For example, if ARRAY1 is {Tim}
, it returns {TRUE; FALSE; TRUE; FALSE}
.
However, ARRAY1 contains two values in this example. In reality, it contains a variable number of values - as does E:E.
I'm not asking to compare an array to an array, because the FILTER function automatically runs through each of E1:E4. So that can be considered to be a single reference - as far as I'm aware.
Changing ARRAY1 to {Tim; Frank}
results in {FALSE; FALSE; FALSE; FALSE}
.
I have no clue what I'm doing really.
Can anyone help me?