Search code examples
google-sheetsfiltermatcharray-formulasgoogle-query-language

Excluding Data in Googlesheet


I have a set of data. There is a case where I have to exclude some data from the data set. Here is the sample case:

https://docs.google.com/spreadsheets/d/1WbsNoUg9b29Hqex55H7fHqzW2rdgm2aAVgy-Y9DTa4Q/edit#gid=0

  1. column A is the data set
  2. column C is the condition that needs to be excluded
  3. column E is the desired result

Is there any way of using Query to filter the data in column A that does not contain any string or value in column C?

Array formula or something that is similar is preferred since I do not need to drag down the formula again in the future


Solution

  • or:

    =QUERY(A:A, "where not A matches '.*"&TEXTJOIN(".*|.*", 1, C:C)&".*'")
    

    enter image description here