Home > database >  How to query match a split string in Google Sheets?
How to query match a split string in Google Sheets?

Time:02-04

How to take a professional photograph

I want to query the above sentence and see if each word above 4 letters is contained within a list.

I want the output to be the words that match.

Ex: professional, photograph

I tried split query regex to no avail :(

CodePudding user response:

Try

=arrayformula(sum(--REGEXMATCH(filter(split(A1," "),len(split(A1," "))>3),TEXTJOIN("|",,list))))=counta(filter(split(A1," "),len(split(A1," "))>3))

with list = list of words, A1 the sentence

enter image description here

CodePudding user response:

With Mike's help, I figured it out!

=FILTER(SPLIT(B3," "),LEN(SPLIT(B3," "))>4)

Thanks Mike!

  •  Tags:  
  • Related