Home > Enterprise >  Google Sheets get QUERY clause from IMPORTRANGE
Google Sheets get QUERY clause from IMPORTRANGE

Time:08-18

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?

CodePudding user response:

try:

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