Web Applications Stack Exchange is a question and answer site for power users of web applications. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

So, I'm in the situation where I have a Google Spreadsheet with people's names, phone numbers, addresses, etc.

Is it possible to, from another spreadsheet (not sheet, different workbook), search the directory spreadsheet for a name entered into a cell, and then pull certain data and populate it into the new sheet?

Essentially, I want to be able to have a new spreadsheet with a name, phone number, etc column, and have it auto populate the phone number (as well as other data) so I don't have to copy and paste.

Is this possible?

share|improve this question

Yes. It is Possible. Just follow some simple steps:

  1. You create a custom function by writing scripts which will work like simple function inside a Spreadsheet cell for ex: =SUM(A1 +A2) by Opening the Google Spreadsheet(That acts like directory ie. Data like name,contacts etc) ->Click Tools->Click Script Editor...

A new window will openup and choose spreadsheet option .Here,you can write custom functions which looks like

enter image description here

Here you write functions (for more info,https://developers.google.com/apps-script/your_first_script#requirements)

2.You create a function that will open your Spreadsheet that contains behaves like directory. A sample function

function readRows()
var sheet = SpreadsheetApp.openById("0AszINz88nA9hdEkxa1FIS0wta1FLS2NPUzAyU0lOV1E")
var rows = sheet.getDataRange();
var numRows = rows.getNumRows();
var values = rows.getValues();
for (var i = 0; i <= numRows - 1; i++) { var row = values[i]; Logger.log(row); } };

For more info,https://developers.google.com/apps-script/reference/spreadsheet/spreadsheet-app#open(File)

You can Run and Test by pressing Run and selecting function, (it may require permission).

You can view the results in Log Window by Opening View->Logs.

That,it now you can use that function in that cell.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.