Google Docs: create drop down list using data from another spreadsheet

Similar to rossmcm's answer but with a few tweaks because his answer didn't work for me:

=IMPORTRANGE(spreadsheet_url; range_string)

Where spreadsheet_url is The full URL of the spreadsheet from where data will be imported, and range_string a string, of the format "[sheet_name!]range" (e.g. "Sheet1!A2:B6" or "A2:B6") specifying the range to import.

Example:

=IMPORTRANGE("https://docs.google.com/spreadsheets/d/1EwEn_2dSbgAlR7jJ7UT_MyE3h1-Biq3qoovfIGUnVlo/edit#gid=0", "Sheet1!A1:A7")

More info from Google DOCS Help!


Getting the items from another workbook, as opposed to another sheet in the same workbook is similar. It's a two-step process. First, you need to import the data you want to use for the validation items into the workbook where you want to make use of it, then connect it up as described in @uselink126's answer.

An example: Workbook 2 contains a list of fruit names in no particular order. The list has been assigned a named range Fruits for readability, but this isn't necessary. Workbook 1, Sheet 1 has a column of cells where we want to populate a drop-down with the items from Workbook 2.

Step 1 - Importing the data

  • Add another sheet to Workbook 1 and insert the following formula into cell A1:

    =ImportRange("<key>","Sheet1!Fruits")
    

where <key> is the unique ID Google docs assigned when you created the spreadsheet. In the example, the items are sorted into alphabetical order as part of the import, and to do this you would enter instead:

    =Sort (ImportRange("<key>","Sheet1!Fruits"), 1, true)

The 1, signifies column 1 is what to sort by, true means sort ascending. The cells in column 1 should populate with the sorted fruits.

Step 2 - Point the data validation to the imported list

On Workbook 1, Sheet 1, Select the cells you want to have the fruits as their drop-down data source. - Right-click the selection and click on Data Validation from the menu. Set Criteria to List from a range and enter Sheet2!A1:A20

That's it. The drop-down chevrons should appear in those cells and when clicked the list of fruits should appear.

Note that this is "live" - adding an item of fruit to Workbook 2's list will also magically add it sorted in the drop-down list.


The format to access cells from another spreadsheet in Google Sheets is:

SheetName!CellAddress

For example, let's say you have a Google Sheet that contains 2 spreadsheets named: Sheet1 and Sheet2 (The names are listed on the tabs at bottom left hand side of each sheet).

In Sheet1 if you wanted to access cell B2 in Sheet2, you reference it by inputting: Sheet2!B2

In Sheet2 if you wanted to access cells C3:C15 in Sheet1 , you reference those cells by inputting: Sheet1!C3:C15

To specifically add cells from another sheet to a dropdown:

1) Select the cell you want the dropdown in

2) Right click on the cell and select Data Validation

3) In the dialog box, click the grid image in the Criteria input box

4) This will bring up the "What Data?" dialog box

5) Click on the tab for the sheet you want to access

6) Hold down shift and click on the cells you want to select (you will see the cell addresses show up in the input box in the "What Data?" dialog)

7) Click OK and you are set. The data will update if you make changes in the source sheet.

More info: https://support.google.com/docs/answer/186103?hl=en

Tags:

Google Docs