Query Over Frozen Columns

19 views
Skip to first unread message

David Heup

unread,
Nov 19, 2025, 10:45:52 AM11/19/25
to Google Sheets Community
Still figuring out the details, but I found a glitch when combining a query and importrange across frozen cells

The formula =query(importrange("https://URL", "Sheet1!C:E")) works just fine, but =query(importrange("https://URL", "Sheet1!C:F")) returns a bunch of data in one cell. In the original sheet, column E is frozen.

The workaround I came up with is to split the query. Just wondering if anyone has a better way.

Dave

Hassam Saeed

unread,
Nov 21, 2025, 12:43:04 PM11/21/25
to Google Sheets Community
Hey David,
I wonder why you are using this:

=query(importrange("https://URL", "Sheet1!C:F"))
instead of this:
=importrange("https://URL", "Sheet1!C:F") 

In case, if you are filtering data thats being imported, then please provide other arguments that you are providing to query formula to better understand the problem.

Note: Frozen columns/rows don't have any impact on the formulas.

Swarup Modak

unread,
Apr 18, 2026, 5:11:20 AM (9 days ago) Apr 18
to Google Sheets Community
Hmm.
Please look at the below:
QUERY(IMPORTRANGE("1Hh2grfB6rp9OQ2yAIu3S5YF_CCFJGwyqPGveABlOZKg", "World Cup!A1:D21"), "SELECT * WHERE Col4 = 'Brazil' ",1)
The first Part is IMPORTRANGE:
IMPORTRANGE("1Hh2grfB6rp9OQ2yAIu3S5YF_CCFJGwyqPGveABlOZKg", "World Cup!A1:D21")
The second part is QUERY, which wraps around the imported data and applies SQL‑like filtering. Without SQL, QUERY is meaningless/incomplete.
Refer to Google Help on QUERY. 

Your can try the following for testing:
QUERY(IMPORTRANGE("1Hh2grfB6rp9OQ2yAIu3S5YF_CCFJGwyqPGveABlOZKg", "World Cup!A1:D21"), "SELECT * ",1)
Then try the following in another Cell:
QUERY(IMPORTRANGE("1Hh2grfB6rp9OQ2yAIu3S5YF_CCFJGwyqPGveABlOZKg", "World Cup!A1:D21"), "SELECT * WHERE Col4 = 'Brazil' ",1)

Swarup.
Reply all
Reply to author
Forward
0 new messages