FormulaCraft

How to use QUERY to filter data in Excel and Google Sheets

Topic:QUERY (Google Sheets SQL)

Heads up: Excel and Google Sheets do this differently.

Excel
=FILTER(A2:C6,C2:C6>100)
Google Sheets
=QUERY(A2:C6,"SELECT A,B,C WHERE C>100",1)

Try it with your data

Edit the grid or formula, then run it through a real spreadsheet engine — no signup.

Sample data — click any cell to edit

Runs server-side · free · no signup

Step by step

  1. 1In Google Sheets, enter =QUERY(A2:C6,"SELECT A,B,C WHERE C>100",1) in an empty area. The third argument (1) tells QUERY how many header rows to skip.
  2. 2Adjust the WHERE condition to match your filter criteria — e.g., WHERE B='Sales' for text.
  3. 3In Excel 365+, use =FILTER(A2:C6,C2:C6>100) instead. The second argument is the filter condition.
  4. 4Both functions spill results automatically into adjacent cells.

Tips

Need the Google Sheets version instead? Open Sheets variant in workspace →

Working on a sheet you inherited? Run the Auditor on the whole file first — it flags every #REF!, #N/A, broken column pattern, and inconsistent formula in seconds, free, no signup.

Frequently asked

Can QUERY filter by multiple conditions?

Yes. Use AND or OR in the WHERE clause: WHERE C>100 AND B='Sales'.

Does Excel have a QUERY equivalent?

Excel 365 has FILTER which handles row filtering. For grouping and aggregation, use PivotTables or Power Query.

More on QUERY (Google Sheets SQL)

See all →

Formulas used

Related tasks

Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.

Last reviewed: