3

I want to create a graph with different stock values starting and ending at a certain day. To do that I create a table like this:

Example

Where the first column is the market and the second one is the ticker of the company. Under both of them is the name of the company combined in two cells.

Now, I want to make a call to Google Finance to get all the stock values daily since a date specified in other cell and sheet:

=GoogleFinance(""&A1&":"&B1; "price"; Stocks!A28; TODAY())

This returns X rows x 2 columns with the headers Date and Close. i.e:

Example2

What can I do to remove the header row, "Date" and "Close", from the table?

I saw another question using the function INDEX to return a value of the array, but I think it only returns one single value and is not possible to return a lot of them starting with an offset:

 =INDEX(GoogleFinance(""&A1&":"&B1; "price"; Stocks!A28; TODAY());2;2)

I also tried using FILTER or OFFSET but I don't know if they just don't work for this or I'm doing something wrong.

4

Please try:

=query(GoogleFinance(""&G1&":"&H1; "price"; Stocks!A28; TODAY());"select * label Col1 '', Col2''")

QUERY

  • 1
    I just tried with: =query(GoogleFinance(""&A1&":"&B1, "price", Stocks!A28, TODAY());"select * label Col1 '', Col2 ''") But it returns #ERROR! – nck Nov 15 '17 at 19:41
  • 1
    Thanks a lot, that was it. I just changed one of them and dind't realize the ones inside "GoogleFinance(" where also changed. – nck Nov 15 '17 at 20:22

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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