Reputation: 321
Goal: I'm trying to pull columns of data with the Query function and I'm not using anything conditions so it shouldn't be complicated.
Current function setup:
=QUERY(IMPORTRANGE("1QUZ-ljkXNOvtnPg-a2FqM2PhYUdt_zX5gMLtB6GcFdc","Status!$A$16:$S"),"SELECT Col2, Col7, Col9, Col10, Col15, Col16, Col17, Col18, Col19, Col20",1)
Issue: I was able to pull data for each column until I included the 20th column which is Column T. The error was a #VALUE! with the message as: "Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: Col20."
I also tried change the code to the following, thinking that I may be selecting too many columns, however I'm still getting the same error: "Unable to parse query string for Function QUERY parameter 2: NO_COLUMN: Col20."
=QUERY(IMPORTRANGE("1QUZ-ljkXNOvtnPg-a2FqM2PhYUdt_zX5gMLtB6GcFdc","Status!$A$16:$S"),"SELECT Col2, Col7, Col9, Col20",1)
Something that I also noticed was that when I changed the query to "SELECT *" then I was only able to pull data up to the 19th column, so I'm assuming that there's a limitation when using the IMPORTRANGE function?
Upvotes: 1
Views: 251
Reputation: 27400
Explanation:
Column 20
is column T
but your range stops at column S
. If you need to query column 20
you need to expand your range up to column T
: "Status!$A$16:$T"
Solution:
=QUERY(IMPORTRANGE("1QUZ-ljkXNOvtnPg-a2FqM2PhYUdt_zX5gMLtB6GcFdc","Status!$A$16:$T"),"SELECT Col2, Col7, Col9, Col10, Col15, Col16, Col17, Col18, Col19, Col20",1)
Upvotes: 1