The Problem
You’ve likely built a formula that looks perfectly fine, but Google Sheets keeps returning a NO_COLUMN: A error. This happens most often when you combine the QUERY function with IMPORTRANGE or data wrapped in curly braces {}.
The error is blunt: Error: Unable to parse query string... NO_COLUMN: A. It is confusing because column A clearly exists in your source sheet. However, the way Google interprets data changes the moment it moves through a function or an array.
A Typical Failing Formula
Imagine you are pulling 500 rows of sales data from an external lead tracker:
=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1abc123", "Leads!A:C"), "SELECT A WHERE B = 'Closed'")
Even if the IMPORTRANGE part works perfectly on its own, the QUERY wrapper fails. It won't recognize 'A' or 'B' as valid column identifiers.
Why This Happens: Range vs. Array
To fix this, you need to understand how the QUERY engine identifies data. It uses two different "languages" depending on the source.
- The Range Context: If you reference a direct range like
A1:C10, Google Sheets knows the physical grid. It understands that 'A' is the first column. - The Array Context: Functions like
IMPORTRANGE,FILTER, or curly braces{Sheet1!A:B}turn data into an Array. In this state, the data is just a floating block of values. It loses its connection to the spreadsheet's lettered columns.
The QUERY engine cannot find "Column A" in an array because the array doesn't know it came from a spreadsheet. It only knows it has a first, second, and third column.
The Solution: Switch to ColX Syntax
Whenever your QUERY source is a function or an array, you must replace column letters (A, B, C) with Col1, Col2, Col3 references.
The Fixed Formula
Here is how the previous failing example looks after the fix:
=QUERY(IMPORTRANGE("https://docs.google.com/spreadsheets/d/1abc123", "Leads!A:C"), "SELECT Col1 WHERE Col2 = 'Closed'")
Strict Rules for ColX Syntax
Google is very specific about how you write these references. One small typo will trigger a new error.
- Case Sensitivity: You must use
Col1. Writingcol1orCOL1will result in a syntax error. - Relative Indexing:
Col1refers to the first column in your selected range. If your range isC:E, thenCol1is actually column C. - No Quotes: Treat
Col1like a reserved keyword. Do not wrap it in single quotes within your query string.
Common Scenarios That Trigger the Error
1. Using IMPORTRANGE
This is the primary culprit. IMPORTRANGE always outputs an array, so you can never use column letters with it.
-- This fails
=QUERY(IMPORTRANGE("URL", "A:Z"), "SELECT A, C")
-- This works
=QUERY(IMPORTRANGE("URL", "A:Z"), "SELECT Col1, Col3")
2. Stacking Multiple Ranges
When you stack data from two sheets using curly braces, you are creating a virtual array.
-- This fails
=QUERY({North_Sales!A:B; South_Sales!A:B}, "SELECT A WHERE B > 5000")
-- This works
=QUERY({North_Sales!A:B; South_Sales!A:B}, "SELECT Col1 WHERE Col2 > 5000")
Quick Verification Checklist
If the formula still isn't working, run through these three checks:
- Check Permissions: If you see a
#REF!error, hover over the cell. You likely need to click "Allow Access" to let the sheets talk to each other. - Count Your Columns: If your range is
A:B(two columns) but your query asks forCol3, the formula will break. - Test the Source: Delete the
QUERY()part and run theIMPORTRANGE()by itself. If the raw data doesn't appear, the issue is with the source URL or range, not the query syntax.
Final Rule of Thumb
Use column letters (A, B, C) only for simple, direct ranges like A1:D100. For everything else—including formulas, curly braces, and imports—always use the Col1, Col2 format. This keeps your formulas robust and prevents the NO_COLUMN error from appearing when your data source evolves.

