Hi guys,
just want to ask if anyone may can help me with this one: I’m looking for an easy way to search for an exact number in an array.
I have this Table “User Air ID” with lots of numbers like “35, 65, 76, 654”. What I want to do to filter a list, I want to make a “filterByFormula” looking for entries containing #65.
When using the functions FIND and SEARCH I not only get the results for number 65 but also for rows containing number 654. That’s a correct results as 65 is also part of 654. Does anyone know how to set up the correct formula for ignoring other numbers than just the 65?
But this kind of query only gets a result when 65 is the only number in the array - and I have arrays with like 50 different numbers and want to know if it contains the specific search number.
That could be. Sorry - my English may not the best here.
I try to explain it another way:
Let’s say I have 3 strings:
String a: “35, 65, 43, 654”
String b: “23, 54, 26, 65”
String c: “654, 23, 26”
And my search term is “65”. I only want to get the records from String a and b as they are containing #65 but not String c as it does not contain the 65.
Using Find and Search I get all 3 strings as a result as the 65 can be also found in String C as part of 654.
When I try the field name = 65 it don’t return any String as it seems to look for a String only containing the 65 (or I am doing something wrong )
Ok, now I get it.
I guess you could try to use REGEX_MATCH function, to form a regular expression for the filter. Sorry, I can’t provide the expression - I’m not such a big expert in this, it’s a whole another world .
Hi @mazze ,
Maybe as a hack/workaround since it is a string, try to search for “, 65,” or “65,”. If User needs to input a number you can concatenate then the comma prior to making the search or where you filter it (filterByFormula). Then the “EQUAL” should work fine. Only challenge here is if number is in last position now like “, 65”.