← Level 6 – Workbook boss

5 / 12 ⏱ 22 minutes Premium

A number from another workbook

The IMPORTRANGE function takes data from another workbook.

Two workbooks

Sometimes the data is in another workbook. Like the answers from a form that got saved into a separate spreadsheet. Sao chéping them would mean two truths.

Google Sheets has the IMPORTRANGE function. It takes data from another workbook and keeps it up to date.

=IMPORTRANGE("workbook address","Sheet!range")

Try it

  1. Open another one of your workbooks, like Snack survey from Chuẩn bị. Sao chép its address from the browser.

  2. In Sheets with Martin, add a sheet called Import.

  3. In A1, type =IMPORTRANGE("paste the address here","Answers!A1:B2").

  4. The first time, you’ll see the error #REF!. Move the mouse over the cell and click Allow access.

  5. The data from the other workbook shows up.

  6. Change something in the other workbook. In a moment, it changes here too.

⚠️

For this to work, whoever is looking needs access to both workbooks. If your teacher couldn’t see the other workbook, they’d see an error.

In Excel

In Excel, you point to another file like this: =[Survey.xlsx]Answers!B2. But both files have to stay where they are and keep the same name. If you rename one, the link breaks.

💡

The simplest thing is to keep everything in one workbook, like you do. Only use IMPORTRANGE when the data really has to be somewhere else.

Đến lượt bạn 💪

  1. You tried IMPORTRANGE.
  2. You know you have to allow access.
  3. You know it’s better to keep everything in one workbook.

When you’re xong, feel miễn phí to delete the Import sheet.

✅

Done when: you can take data from another workbook.

What to take away from this lesson