How do you import or exchange data from one sheet to another with Google Sheets

Importing data from one spreadsheet to another is very similar to importing data between sheets within the same spreadsheet.


STEP 1 : Accessing the value of one cell which is in another spreadsheet 

Google Spreadsheets allow you to create an unlimited amount of spreadsheets, share and work on them with friends and colleagues in real time. Provided you have view permission to a spreadsheet, you can import a range, a whole sheet from one spreadsheet to another without affecting the source sheet. Addressing is very similar to Step 1, but this time it uses a function called importrange().

Example

Here is the spreadsheet and sheet we are going to pull data from. Note the value of the key= parameter which is the address of the spreadsheet (do not include the #) :

https://docs.google.com/spreadsheet/ccc?key=0Akd1gJoxWTi1dFFwUDAySGp0VVpYLXM0RHZablVjR3c#gid=0

In a new spreadsheet, we want to import the value of cell C2 from sheet "facts". First, let's create a new spreadsheet, and select a cell. Then let's use the importrange() function :

=importrange("0Akd1gJoxWTi1dFFwUDAySGp0VVpYLXM0RHZablVjR3c", "facts!C2")



... and voilĂ  !  Please note that you can use the content of the cell, you can format the colour or numeric type, but you cannot edit the cell and of course modify the content of the remote cell.


STEP 2 : Accessing the value of several cells from a remote spreadsheet 

Now that you know how to import one cell, importing two or more is quite easy. The selection of a group of cells is called a range. Most spreadsheet software use the colon separator : to create a range of cells. Example : the top 4 cells of a sheet define a range identified by A1:B2, where the starting point is cell A1 and the end point is cell B2.



With that in mind, how about importing the 9 cells from the top left corner of your remote spreadsheet ?

=importrange("0Akd1gJoxWTi1dFFwUDAySGp0VVpYLXM0RHZablVjR3c", "facts!A1:C3")




Note that imported cells display a continue() function with contains some addressing parameters. Do not worry about these. You cannot modify these, but you can still use their content. For instance, imported numbers in cells C1 and C2 can be summed up (C7).



Have fun with spreadsheets !

Comments

Popular posts from this blog

How to calculate the quarter for a given date in Google Sheets

How to sort pivot data in descending order in Google Sheets (Part 1)

How to sort pivot data in descending order in Google Sheets (Part 2)