0

I currently have 2 Google Sheets with their own respective tables, Table1 and Table2.

Table1 is located in the example below from Column A to Column C. This was Query 1.

Table2 is located from E to G. This was Query 2.

My desired outcome is Table3 located in Column I to K.

enter image description here

Both of these table have been imported from separate sheets into my newly created sheet using 2 different Queries.

Here is an example of the code that I used:

=Query(IMPORTRANGE("url_example1", "Sheet1!A1:Z"), "select Col1, Col2, Col7", 1)

And another:

=Query(IMPORTRANGE("url_example2", "Sheet2!A1:Z"), "select Col1, Col2, Col7", 1)

Is there a way to combine both tables chronologically with 1 Query?

If not, what is the best way to accomplish this goal? Any help would be greatly appreciated.

Again my hope is to combine 2 Google Sheets Query tables into one table and have the data sorted chronologically. Thanks for your time.

Able Archer
  • 579
  • 5
  • 19

1 Answers1

-1

use:

=QUERY({IMPORTRANGE("url_example1", "Sheet1!A1:Z"); 
        IMPORTRANGE("url_example2", "Sheet1!A2:Z")}, 
 "select Col1,Col2,Col7 
  order by Col1 asc", 1)
player0
  • 124,011
  • 12
  • 67
  • 124
  • [A code-only answer is not high quality](//meta.stackoverflow.com/questions/392712/explaining-entirely-code-based-answers). While this code may be useful, you can improve it by saying why it works, how it works, when it should be used, and what its limitations are. Please [edit] your answer to include explanation and link to relevant documentation. – Stephen Ostermiller Dec 10 '22 at 10:31
  • 1
    I am sorry for the delay. I received an error but it's most surely on my end. I will have time to work on this more this week. Thank you for your response! Very grateful for that. Will update soon. – Able Archer Dec 12 '22 at 22:48