60

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?

yuvalm2
  • 866
  • 2
  • 10
  • 27
guagay_wk
  • 26,337
  • 54
  • 186
  • 295

3 Answers3

128

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)
makhan
  • 3,809
  • 2
  • 18
  • 24
  • 4
    Is there a way to deal with the Saturday and Sunday prices? – user1372829 Jul 16 '16 at 04:50
  • 2
    Unfortunately Google has their finance head so far up their ass, these formulas no longer work anymore. Gotta use =INDEX(GOOGLEFINANCE("GOOG","price",date(2015,12,13)),2,2) like TechySoul points out. – John Pitts Jul 12 '20 at 18:04
31

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

TechySoul
  • 311
  • 3
  • 3
6

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.

L.Butz
  • 2,466
  • 25
  • 44
  • 2
    Can't edit right now, but there is a quote missing "22.06.2021 -> "22.06.2021" AND if you copy this and add the quote, you still get an error, only as reference date field it worked for me @l-butz – Martin Krung Nov 16 '22 at 16:09