Search code examples
google-sheetsgoogle-sheets-formulagoogle-query-languagenamed-ranges

Using query, Import Range and named range to either label the named range or ignore the header


Context

So I am trying to put together some data to run a machine learning model. I need all the data in one google sheet. But I am importing the data from a different spreadsheet saved elsewhere.

This is my current formula =QUERY(IMPORTRANGE("link", "AvevaReturns")) Screen reader support enabled.

It returns the spreadsheet but with the column label which is located in row 3 (two rows above it are blank).

I have tried this, this and this to no avail.

Problem

I don't want the header included. I tried relabelling it using the label function in query according to the required order. If this does not work, how do I retrieve the data without the label?


Solution

  • try:

    =QUERY(QUERY(IMPORTRANGE("ID", "NamedRange"), "offset 1", 0), 
     "select Col1 where Col1 contains '"&B2&"'")