Domanda

I want to get the price of a particular stock at a particular date in Google Sheets using the Google Finance forumula.

I tried this formula:

=GOOGLEFINANCE("GOOG","price",12/13/2013)

But it didn't work.

How can this be done?

È stato utile?

Soluzione

Just surround the date by quotation marks:

=GOOGLEFINANCE("GOOG","price","12/13/2013")

Also, if you want only the number, wrap it in INDEX formula

=INDEX(GOOGLEFINANCE("GOOG","price","12/13/2013"),2,2)

Altri suggerimenti

This API has undergone some changes and the updated solution that now works is like this -

=INDEX(GOOGLEFINANCE("GOOG","price",date(2015,12,13)),2,2)

For more updates on the Google Finance API to be used in Google Docs please refer here

Update August 2022

I have tried several of the solutions here and none of them worked for me. After a while I noticed that all the solutions use "," as the separator but for me it must be ";" for some reason.

What worked for me is the following:

=INDEX(GOOGLEFINANCE("CHFEUR"; "price"; "22.06.2021);2;2)

This fetches the exchange price from CHF to EUR on 22.06.2021 and gives you back only the numeric value of the price (hence, the INDEX function wrapping around).

I hope this helps anyone struggling with the same issue.

Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a StackOverflow
scroll top