Home > database >  How To refer to import range formulas saved in a cell
How To refer to import range formulas saved in a cell

Time:01-05

i use Query function to import data from other google sheets files like this :

=QUERY({
        IMPORTRANGE("First Sheet URL","first sheet range"); 
        IMPORTRANGE("Second Sheet URL","Second Sheet Range")
       },
           "SELECT * ",0)

what i want now is to save these IMPORTRANGE formulas on a cell like this :

A1 = IMPORTRANGE("First Sheet URL","first sheet range")
A2 = IMPORTRANGE("Second Sheet URL","Second Sheet Range")

And then refer to those cells, so the query formula will become like this :

=QUERY({
        A1; 
        A2
       },
           "SELECT * ",0)

CodePudding user response:

I suggest to try

=QUERY({
        IMPORTRANGE(A1,B1); 
        IMPORTRANGE(A2,B2)
       },
           "SELECT * ",0)

with URLs in A1 and A2 and ranges in B1 and B2

  •  Tags:  
  • Related