Google Sheets QUERY WHERE IN List: OR and MATCHES Examples
Filter a Google Sheets QUERY by a list of values using OR or MATCHES. Includes fixed lists, cell-driven lists, numbers, exclusions and common errors.
Read guidePractical, example-led guides for solving real problems with spreadsheets, Python and business automation.
# Turn a repetitive task into a script
from pathlib import Path
files = Path("reports").glob("*.csv")
for report in files:
clean(report)
print(f"✓ {report.name}")
# Small script. Big time saved.Filter a Google Sheets QUERY by a list of values using OR or MATCHES. Includes fixed lists, cell-driven lists, numbers, exclusions and common errors.
Read guideFix common Google Sheets QUERY errors including parse errors, NO_COLUMN, mismatched array row size, mixed data types, headers, Col notation and ARRAY_LITERAL.
Read guideUse if else inside a Python list comprehension to transform elements, or a trailing if to filter them, with examples combining and nesting both.
Read guide