6

This is the problem I'm seeing:

Error - Unable to parse query string for function QUERY parameter 2: NO_COLUMND

Error - Unable to parse query string for function QUERY parameter 2: NO_COLUMND

The formula is of the form:

=query(importange("...", "Sheet!A:V"), "select D where V = 1", 1)

I imported data from another sheet, I want this current sheet to display column D when Column V is 1.

Is there a different way rather than my current formula?

  • Don't rely on the picture. Not everyone can see it. You'll be better served by including the text of your function in your question. – ale May 20 '16 at 20:04
  • You've misspelled "importrange" in your query. – ale Jul 19 '18 at 12:39
12

When using query with importrange, the imported columns must be referred to as Col1, Col2, Col3, etc, according to their positions in the imported range. So, you should replace

"select D where V = 1" 

with

"select Col4 where Col22 = 1" 

The reason is that imported range is not considered a part of any sheet, so its column names are not like sheet column names.

To find the number of a column without reciting the alphabet, you may want to put =column() in it temporarily.

| improve this answer | |
-2

Just something that i found especially if you find that you have done everything correct with your syntax and links. When attempting to import multiple ranges or sheets, it could be throwing this error due to a lack of permissions granted. It is likely that you have link-sharing turned off for the source spreadsheets that you desire to import and query. In general it is a GOOD practice to never turn on link sharing for spreadsheets that are the 'source' of your merge. So if this is the case, likely this is the reason why some importrange query's that people have difficulty with in google sheets are not working right. Since it can be unsecure to turn link-sharing on in order to avoid this, and you might want the increased security of leaving your docs set to 'share only with specific people', here is one solution i found.

In a separate, blank sheet within the same file you hope to combine the data from multiple sheets into, run an importrange on each spreadsheet url you are trying to import, one by one. You'll notice that when you hover over the error in the formula, assuming your syntax is correct, it will ask you to grant permission to the new spreadsheet to access the source spreadsheets. Do this for every spreadsheet url that you want to import; one by one. Then when you run your original importrange function on multiple spreadsheet urls in one formula, it will work. (Again assuming that the syntax used here is also good as well.) Oh and this seems to apply to even COPIES of the same master combined sheet you make. For some reason, i had to repeat the process for copies of the merger spreadsheet as well.

I searched and searched and finally discovered this after hours! For some reason when trying to use importrange on multiple spreadsheets in the same formula, google throws an error that can sometimes have nothing to do with what's actually wrong and the issue may have to do with permission issues; since the formula can't find any data where it is expecting to. (Hence things like the col errors and even other errors like array errors.)

Hope this helps! :) I think it goes back to the fact that none of my source sheets have link sharing turned ON and sharing is only for specific people via email. But again, this is A LOT safer. Worth the inconvenience i'd say especially in view of the potential issues that can be involved with link-sharing .... google it :)

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.