Home > Mobile >  google query dynamic range specification
google query dynamic range specification

Time:10-22

I have a google query which uses a variable range. Here's a part of the query

  =query({INDIRECT(V2),arrayformula(row(INDIRECT(V2)))}, "select Col2,

where V2 contains

  ="Trades!A2:N"&getTradesLastRow()

trying to figure out a way to not have the extra reference to V2. Having trouble with the syntax when I try to change the query parameter to be something like

  =query({Trades!A2:N&getTradesLastRow(),arrayformula(row(Trades!A2:N&getTradesLastRow()))}, "select Col2,

CodePudding user response:

You just have to use indirect like you had originally in V2

=query({INDIRECT(V2),arrayformula(row(INDIRECT("Trades!A2:N"&getTradesLastRow())))}, "select Col2,
  • Related