Leo Milani
Leo Milani

Reputation: 13

Google Sheets get QUERY clause from IMPORTRANGE

I have a QUERY in Google Sheets, like:

=QUERY('Sheet1'!A:C, "select A where C <100")

That works perfect, BUT... what if I want to get this "100" value, from another document? Like:

=QUERY('Sheet1'!A:C, "select A where C < IMPORTRANGE("GoogleSheetURL", "Sheet!$A$1")")

I've tried with many syntax and ways to include this IMPORTRANGE in the clause, without success! =( It´s impossible??... or It´s just I'm doing it not as it is supossed to be done?

Upvotes: 1

Views: 55

Answers (1)

player0
player0

Reputation: 1

try:

=QUERY('Sheet1'!A:C; 
 "select A 
  where C < "&IMPORTRANGE("GoogleSheetURL"; "Sheet!A1"))

Upvotes: 1

Related Questions