6.9 C
London
Thursday, December 19, 2024
HomeSoftware TutorialsGoogle SheetsGoogle Sheets: How to Filter IMPORTRANGE Data

Google Sheets: How to Filter IMPORTRANGE Data

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 IMPORTRANGE function in Google Sheets to import data from another spreadsheet.

To apply a filter to the IMPORTRANGE function, you can use the following syntax:

=FILTER(IMPORTRANGE("URL", "sheet1!A1:C12"),
        INDEX(IMPORTRANGE("URL", "sheet1!A1:C12"),0,2)="Spurs")

This particular example will import the cells in the range A1:C12 from the sheet called sheet1 from some workbook and filter the range to only show the rows where the value in column 2 is equal to “Spurs.”

The following example shows how to use this syntax in practice.

Example: How to Filter IMPORTRANGE Data

Suppose we would like to import data from a Google spreadsheet with a sheet named stats located at the following URL:

Also suppose that we would only like to import the rows where the value in the second column (the “Team” column) has a value of “Spurs.”

We can type the following formula into cell A1 of our current spreadsheet to import this particular data:

=FILTER(IMPORTRANGE("1AdlE9V0aYMdrCmAGtvGXIEfo3szQ1tWRJ2HhJkUhg_4", "stats!A1:C12"),
        INDEX(IMPORTRANGE("1AdlE9V0aYMdrCmAGtvGXIEfo3szQ1tWRJ2HhJkUhg_4", "stats!A1:C12"),0,2)="Spurs")

The following screenshot shows how to use this syntax in practice:

Google Sheets filter IMPORTRANGE data

Notice that only the rows where the value in the Team column is equal to “Spurs” were imported.

To filter the rows where the Team column is equal to a different name, simply replace “Spurs” with a different team name in the formula.

Additional Resources

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

Google Sheets: Use IMPORTRANGE with Multiple Sheets
Google Sheets: How to Use IMPORTRANGE with Conditions
Google Sheets: How to Use VLOOKUP From Another Workbook

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