1

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?

Draco D
  • 314
  • 1
  • 6
  • 16

1 Answers1

1

try:

=QUERY(QUERY(IMPORTRANGE("ID", "NamedRange"), "offset 1", 0), 
 "select Col1 where Col1 contains '"&B2&"'")
player0
  • 124,011
  • 12
  • 67
  • 124
  • Thank you for responding :). It works! Though not quite sure what the B2 stands for. Could you please explain? – Draco D Jan 15 '21 at 02:47
  • There is an issue, when I insert data to the left of it (a column next to it), it does not return all the figures. It returns less than is in the original sheet. Is there a reason for this? – Draco D Jan 15 '21 at 03:02
  • So it seems like just having the first line is more than enough to do that task. Thank you :) – Draco D Jan 15 '21 at 03:22
  • 1
    @Desmond B2 is just an example – player0 Jan 15 '21 at 06:36
  • 1
    Linking docs for reference - https://developers.google.com/chart/interactive/docs/querylanguage#offset – iansedano Jan 15 '21 at 08:31