How to display registered values in one Google Drive worksheet in another through query by JS

2

I have a table in Google Drive and I want to use Scripts to do what I want to stay in a more dynamic way.

On Page2, I have the "Result", "Delay" and "Arrival" fields with their results filled out below, I want to create a page on Page1 in a field, a select that you see in Page2, in the Result, Delay and arrive and show me the records registered on Page2, in the column next to where you select the field (in this case the results should come in column B1 and the search term be in column A1 with the select section).

    
asked by anonymous 25.02.2014 / 15:23

1 answer

1

If you want to get the data from one sheet to another use this: ( source )

// Pega o conteúdo da A1 na Sheet1:
=Sheet1!A1

// Caso a folha tenha espaços no nome use isso:
='Sheet number two'!B4

Continuing the answer, according to what the author wants:

In cell A1, use data validation to create a field . In cell B2 use the lookup() function:

// Documentação:
=LOOKUP(celula com a caixa de selecao, celulas com o título, celulas com os dados)

// Utilização:
=LOOKUP($A$1, Sheet2!$A$1:$B$1, Sheet2!$A2:$B2)

Where Sheet2 is the name of the sheet where the data is. Then pull cell B2 down by filling in the other cells that will show the data on the other sheet.

    
25.02.2014 / 15:43