Search code examples
google-sheetsgoogle-sheets-formulagoogle-sheets-querygoogle-query-languageimportrange

Google Sheets import range returning incorrect data


The full google spread sheet system is used for score keeping and is prone to delays when updating, however I have never run into an issue like this were the same basic function is returning two separate results. The problem is repeatable and occurs on more than one spreadsheet.

I have created a test sheet- https://docs.google.com/spreadsheets/d/1arh0D9ch5MpQjRh_bHjLfLx5S7TAW8R_pgGLf5tovig/ with the code in question; Can anyone help please?

=QUERY(IMPORTRANGE("***","***"),"select Col1 where Col1 <>5 order by Col9 desc")

Solution

  • in your QUERY formula you are selecting cells that are numeric and comparing it to <>5 but take a notice that A2 is not numeric:

    0

    that is the reason why 2 2 is not included in your C column

    also it looks like that your QUERY formula smashed first cells into one because you did not specify the 3td query parameter. try:

    =QUERY(IMPORTRANGE("1pnowvo6YVj-DZAPCaKE2x9vSIbpAAmlwhRMO2OZNlrE","color!A84:M115"),
     "select Col1 where Col1 <>5 order by Col9 desc", 0)