Search code examples
google-sheetsgoogle-sheets-formulaarray-formulasgoogle-sheets-querygoogle-query-language

Filter multiple columns with same function?


=filter('Handle Database'!A:AF,'Handle Database'!Z:Z<>"Plastic",'Handle Database'!X:X<>"Plastic",'Handle Database'!Y:Y<>"Plastic")

Is there a more concise way of writing this? Instead of listing out each individual column separately? Or should I use =QUERY instead?


Solution

  • try:

    =ARRAYFORMULA(QUERY({'Handle Database'!A:AF},  
     "where "&TEXTJOIN(" and ", 1, "not Col"&COLUMN(X:Z)&" = 'Plastic'")))