Reputation:
I am trying to use formulas to find a row in my google spreadsheet document, however I have got a weird problem.
I am not able to find values when a cell contains a number (without any other characters).
Consider the following case
I have got two values
A1 - 32323232323
A2 - 323-23232-323
When I use the following formula
=FILTER(A:E,REGEXMATCH(B:B,"323-23232-323"))
It works fine, it successfully finds A2 value, however when I try to use the following formula
=FILTER(A:E,REGEXMATCH(B:B,"32323232323"))
It doesn't match any row, and I also tried the following formula
ADDRESS(MATCH("32323232323",B:B,0),1)
It doesn't work either, it only works when I remove quotes like that
ADDRESS(MATCH(32323232323,B:B,0),1)
But this doesn't work with REGEXMATCH
.
Is there any way I can match numbers using a regex expression (exact number, without wildcards) ?
Thanks
Upvotes: 0
Views: 1521
Reputation: 18717
=FILTER(A:A,REGEXMATCH(REGEXREPLACE(TO_TEXT(A:A),"-",""), "32323232323"))
=FILTER(A:E,REGEXMATCH(TO_TEXT(B:B),"32323232323"))
Notes:
to_text
is a key here.Upvotes: 3