Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed:
The QUERY function in Google Sheets accepts a SQL-like string (based on Google's Visualization API query language). A parse error means Sheets could not interpret that string — a keyword is misspelled, column labels are used instead of Col1/Col2 references, or string literals are not delimited correctly. The error message usually specifies the position in the query string where parsing failed.
=QUERY(A1:D100,"SELECT A WHERE B = \"East\"",1)=QUERY(A1:D100,"SELECT Col1 WHERE Col2 = 'East'",1)Changed column letters to positional Col references and replaced double-quoted string literal with single quotes, which is the required syntax inside a QUERY string.
Edit the grid or formula, then run it through a real spreadsheet engine — no signup.
Sample data — click any cell to edit
Stop hunting errors by hand.
Upload your spreadsheet and the Auditor flags every QUERY error and broken formula at once — or paste this one formula and get the fix explained.
In most cases no — use positional Col references. Header names work only in specific circumstances and are fragile. Positional references (Col1, Col2) are always reliable.
Concatenate the cell reference into the query string: =QUERY(A1:D100,"SELECT Col1 WHERE Col2 = '"&B1&"'",1). Be careful with single quotes around the injected value.
It means QUERY cannot find column A in the data range when you use a column letter reference. Switch to Col1, Col2 notation — or if using headers=1, confirm the header row is included in the range.
Use Google Sheets QUERY with a WHERE clause to filter rows dynamically — Excel users can use FILTER as the equivalent.
How-toUse Google Sheets QUERY with GROUP BY and SUM to aggregate data by category — use SUMIF for the Excel equivalent.
How-toUse QUERY GROUP BY with multiple columns in Google Sheets to create multi-level summaries. Excel alternative uses SUMIFS with multiple criteria ranges.
How-toFilter QUERY results in Google Sheets using WHERE with AND and OR conditions. Excel users can replicate this with FILTER using * for AND and + for OR.
How-toBuild a running total in Google Sheets by combining QUERY for ordering with ARRAYFORMULA and SUMIF. Excel alternative uses a simple SUMIF with a locked anchor row.
How-toCombine QUERY and IMPORTRANGE in Google Sheets to filter and aggregate data from another spreadsheet file. There is no Excel equivalent — use Power Query to connect workbooks instead.
Written and reviewed by FormulaCraft Team. Each formula on this page is run through our verification engine before publishing.
Last reviewed: