The REGEXMATCH()
certainly works but it's hard to remember and, according to my limited testing, much slower than simply using an OR()
like this:
=NOT(OR(N2="facebook",N2="pinterest",N2="twitter"))
On a 250,000 cell sheet, using a filter with 135 strings (which is simply the actual data I wanted to filter), the REGEXMATCH()
version takes 22 seconds to filter the sheet whereas the OR()
version takes about 3.5 seconds.
The REGEXMATCH()
certainly has the potential to make much more complex and powerful searches so it's well worth knowing.
Note: In my example I'm assuming you have a header in the first row, so the reference to the data in column N
is set to look at the second row (where the actual data to be filtered starts); N2
(thanks to John Pratt's answer above for that!). If you have no header row simply use N1
instead.
Along those same lines; this version of the REGEXMATCH()
from user79865's answer is more efficient, taking about 20 seconds (about 10% faster) on my sheet, because it doesn't concatenate the whole column and apply the REGEXMATCH()
to the result of that, for every row.
=REGEXMATCH(N2,"(?i)facebook|pinterest|twitter")
The only difference to user79865's answer is that this version uses N2
instead of N:N
(or N1
if you have no header row).