Bird
Raised Fist0
Google Sheetsspreadsheet~15 mins

IMPORTRANGE for other spreadsheets in Google Sheets - Real Business Scenario

Choose your learning style10 modes available

Start learning this pattern below

Jump into concepts and practice - no test required

or
Recommended
Test this pattern10 questions across easy, medium, and hard to know if this pattern is strong
Scenario Mode
👤 Your Role: You are a sales analyst at a retail company.
📋 Request: Your manager wants a consolidated sales report that combines data from multiple regional spreadsheets into one master sheet.
📊 Data: You have separate Google Sheets for each region (East, West, North) with sales data including Date, Product, Units Sold, and Revenue.
🎯 Deliverable: Create a master Google Sheet that imports sales data from each regional spreadsheet using IMPORTRANGE, then summarize total revenue by region.
Progress0 / 9 steps
Sample Data
DateProductUnits SoldRevenue
2024-05-01Widget A10200
2024-05-02Widget B5150
2024-05-03Widget C8240
2024-05-04Widget A7140
2024-05-05Widget B6180
1
Step 1: Open your master Google Sheet where you want to combine data from all regions.
No formula needed for this step.
Expected Result
You have a blank sheet ready to import data.
2
Step 2: In cell A1, import data from the East region spreadsheet using IMPORTRANGE. Use the spreadsheet URL and specify the range with headers.
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/EAST_SPREADSHEET_ID/edit", "Sheet1!A1:D6")
Expected Result
East region sales data appears in the master sheet starting at A1.
3
Step 3: In cell F1, import data from the West region spreadsheet using IMPORTRANGE with the correct URL and range.
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/WEST_SPREADSHEET_ID/edit", "Sheet1!A1:D6")
Expected Result
West region sales data appears in the master sheet starting at F1.
4
Step 4: In cell K1, import data from the North region spreadsheet using IMPORTRANGE with the correct URL and range.
=IMPORTRANGE("https://docs.google.com/spreadsheets/d/NORTH_SPREADSHEET_ID/edit", "Sheet1!A1:D6")
Expected Result
North region sales data appears in the master sheet starting at K1.
5
Step 5: Create a summary table below the imported data to calculate total revenue by region. In cell A10, type 'Region'. In B10, type 'Total Revenue'.
No formula needed for this step.
Expected Result
Headers for summary table appear in A10 and B10.
6
Step 6: In cell A11, type 'East'. In B11, calculate total revenue for East region by summing the Revenue column from the imported East data.
=SUM(D2:D6)
Expected Result
Total revenue for East region is calculated as 910.
7
Step 7: In cell A12, type 'West'. In B12, calculate total revenue for West region by summing the Revenue column from the imported West data (starting at column J).
=SUM(J2:J6)
Expected Result
Total revenue for West region is calculated correctly based on imported data.
8
Step 8: In cell A13, type 'North'. In B13, calculate total revenue for North region by summing the Revenue column from the imported North data (starting at column N).
=SUM(N2:N6)
Expected Result
Total revenue for North region is calculated correctly based on imported data.
9
Step 9: Format the summary table with bold headers and currency format for total revenue.
No formula needed for this step.
Expected Result
Summary table looks clear and professional.
Final Result
West_Total
North_Total
The East region generated $910 in revenue for the period.
The West and North regions' total revenues are visible and updated automatically from their spreadsheets.
Using IMPORTRANGE allows the master sheet to stay updated when regional data changes.
Bonus Challenge

Create a combined list of all sales from all regions in one continuous table in the master sheet.

Show Hint
Use the ARRAYFORMULA and QUERY functions along with IMPORTRANGE to stack data vertically.

Practice

(1/5)
1. What does the IMPORTRANGE function do in Google Sheets?
easy
A. It imports data from one Google Sheet to another using a URL and range.
B. It exports data from Google Sheets to a CSV file.
C. It creates a chart based on selected data.
D. It sorts data within the same sheet.

Solution

  1. Step 1: Understand the purpose of IMPORTRANGE

    The IMPORTRANGE function is designed to pull data from a different Google Sheet using its URL or key and a specified range.
  2. Step 2: Compare options with the function's purpose

    Only It imports data from one Google Sheet to another using a URL and range. correctly describes this behavior. Options A, B, and D describe unrelated functions.
  3. Final Answer:

    It imports data from one Google Sheet to another using a URL and range. -> Option A
  4. Quick Check:

    IMPORTRANGE imports data between sheets [OK]
Hint: Remember: IMPORTRANGE pulls data from another sheet [OK]
Common Mistakes:
  • Confusing IMPORTRANGE with export functions
  • Thinking it sorts or charts data
  • Assuming it works within the same sheet only
2. Which of the following is the correct syntax to import cells A1 to B5 from another spreadsheet using IMPORTRANGE?
easy
A. =IMPORTRANGE(spreadsheet_url, "A1:B5")
B. =IMPORTRANGE(spreadsheet_url, A1:B5)
C. =IMPORTRANGE("spreadsheet_url", A1:B5)
D. =IMPORTRANGE("spreadsheet_url", "A1:B5")

Solution

  1. Step 1: Check the syntax requirements for IMPORTRANGE

    The first argument must be a string with the spreadsheet URL or key in quotes. The second argument must be a string with the range in quotes.
  2. Step 2: Identify the correct option

    =IMPORTRANGE("spreadsheet_url", "A1:B5") correctly uses quotes around both arguments. Options A and B miss quotes around the URL or range, and C misses quotes around the range.
  3. Final Answer:

    =IMPORTRANGE("spreadsheet_url", "A1:B5") -> Option D
  4. Quick Check:

    Both URL and range must be quoted strings [OK]
Hint: Always put URL and range inside quotes [OK]
Common Mistakes:
  • Forgetting quotes around URL or range
  • Using cell references without quotes
  • Using commas inside range string
3. Given the formula =IMPORTRANGE("https://docs.google.com/spreadsheets/d/abc123", "Sheet1!C2:C4"), what will be the output if Sheet1 cells C2, C3, and C4 contain 10, 20, and 30 respectively?
medium
A. 10
B. [10, 20, 30]
C. Error: Access denied
D. 30

Solution

  1. Step 1: Understand the range and data

    The range "Sheet1!C2:C4" includes three cells with values 10, 20, and 30.
  2. Step 2: Determine IMPORTRANGE output

    IMPORTRANGE imports the entire range as an array of values, so it returns [10, 20, 30].
  3. Final Answer:

    [10, 20, 30] -> Option B
  4. Quick Check:

    IMPORTRANGE returns all cells in the range [OK]
Hint: IMPORTRANGE returns all cells in the specified range [OK]
Common Mistakes:
  • Expecting only the first cell value
  • Confusing output with error messages
  • Not recognizing array output
4. You entered =IMPORTRANGE("https://docs.google.com/spreadsheets/d/abc123", "Sheet1!A1:A3") but see a #REF! error. What is the most likely fix?
medium
A. Click the cell and allow access to the other spreadsheet.
B. Change the range to "A1:A2".
C. Remove quotes around the URL.
D. Use a different function like VLOOKUP.

Solution

  1. Step 1: Understand #REF! error with IMPORTRANGE

    #REF! often appears when access permission to the source spreadsheet is not granted yet.
  2. Step 2: Identify the fix

    Clicking the cell usually prompts a permission request to allow access. Granting access fixes the error.
  3. Final Answer:

    Click the cell and allow access to the other spreadsheet. -> Option A
  4. Quick Check:

    Grant access to fix #REF! error [OK]
Hint: Grant permission when #REF! appears with IMPORTRANGE [OK]
Common Mistakes:
  • Changing range unnecessarily
  • Removing quotes causing syntax errors
  • Switching functions without reason
5. You want to import the range B2:D4 from a spreadsheet with URL https://docs.google.com/spreadsheets/d/xyz789 but only if the values in column B are greater than 50. Which formula correctly combines IMPORTRANGE and FILTER to do this?
hard
A. =IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", "Sheet1!B2:D4") > 50
B. =IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", FILTER("Sheet1!B2:D4", "Sheet1!B2:B4" > 50))
C. =FILTER(IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", "Sheet1!B2:D4"), IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", "Sheet1!B2:B4") > 50)
D. =FILTER("Sheet1!B2:D4", IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", "Sheet1!B2:B4") > 50)

Solution

  1. Step 1: Understand combining IMPORTRANGE and FILTER

    IMPORTRANGE imports data, FILTER filters rows based on a condition. We must import the full range and separately import the column to filter on.
  2. Step 2: Analyze each option

    =FILTER(IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", "Sheet1!B2:D4"), IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", "Sheet1!B2:B4") > 50) imports the full range and filters rows where column B values are > 50 using a second IMPORTRANGE call for column B. This is correct.
    =IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", FILTER("Sheet1!B2:D4", "Sheet1!B2:B4" > 50)) incorrectly tries to use FILTER inside IMPORTRANGE, which is invalid.
    =IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", "Sheet1!B2:D4") > 50 compares the entire imported range to 50, which is invalid.
    =FILTER("Sheet1!B2:D4", IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", "Sheet1!B2:B4") > 50) tries to filter a string range without importing it first, which is invalid.
  3. Final Answer:

    =FILTER(IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", "Sheet1!B2:D4"), IMPORTRANGE("https://docs.google.com/spreadsheets/d/xyz789", "Sheet1!B2:B4") > 50) -> Option C
  4. Quick Check:

    Use FILTER on IMPORTRANGE data with condition on imported column [OK]
Hint: Use FILTER on IMPORTRANGE twice: full range and condition column [OK]
Common Mistakes:
  • Trying to FILTER inside IMPORTRANGE
  • Comparing entire range directly to a number
  • Filtering a range string without importing