22.9 C
London
Monday, July 21, 2025
HomeSoftware TutorialsGoogle SheetsGoogle Sheets: How to Query From Multiple Sheets

Google Sheets: How to Query From Multiple Sheets

Related stories

Learn About Opening an Automobile Repair Shop in India

Starting a car repair shop is quite a good...

Unlocking the Power: Embracing the Benefits of Tax-Free Investing

  Unlocking the Power: Embracing the Benefits of Tax-Free Investing For...

Income Splitting in Canada for 2023

  Income Splitting in Canada for 2023 The federal government’s expanded...

Can I Deduct Home Office Expenses on my Tax Return 2023?

Can I Deduct Home Office Expenses on my Tax...

Canadian Tax – Personal Tax Deadline 2022

  Canadian Tax – Personal Tax Deadline 2022 Resources and Tools...

You can use the following basic syntax to query from multiple sheets in Google Sheets:

=QUERY({Sheet1!A1:C9;Sheet2!A1:C9;Sheet3!A1:C9})

You can also use the following syntax to select specific columns from the sheets:

=QUERY({Sheet1!A1:C9;Sheet2!A1:C9;Sheet3!A1:C9}, "select Col1, Col2") 

The following examples show how to use this syntax in practice.

Example 1: Query From Multiple Sheets

Suppose we have the following two sheets called Week1 and Week2 that contain data about basketball players for two different weeks:

We can use the following formula to query data from both sheets and place the results in a new sheet called All_Data:

=QUERY({Week1!A1:C9;Week2!A1:C9})

Here’s how to use the formula in practice:

Notice that all of the data from Week2 is simply stacked underneath the data from Week1.

Example 2: Query & Select Columns From Multiple Sheets

We can use the following formula to query data from both sheets and place the results in a new sheet called All_Data and also select only specific columns to appear in the new sheet:

=QUERY({Week1!A1:C9;Week2!A1:C9}, "select Col1, Col2")

Here’s how to use the formula in practice:

Notice that only the first two columns (“Team” and “Points”) are shown in the final sheet since we specifically chose Col1 and Col2 in our select statement.

Additional Resources

The following tutorials explain how to perform other common queries in Google Sheets:

Google Sheets: How to Select Multiple Columns in Query
Google Sheets: How to Query From Another Sheet
Google Sheets: How to Use Group By in Query
Google Sheets: How to Use Order By in Query

Subscribe

- Never miss a story with notifications

- Gain full access to our premium content

- Browse free from up to 5 devices at once

Latest stories