Reputation: 28030
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?
Upvotes: 66
Views: 140862
Reputation: 1539
1.Create a separate 'DATE' column and set it's column format to date (Format toolbar>Number>Date) .
2.Then, reference the cell number of the desired date into the price formula.
This should give the price for the particular date .
Also ,for Saturday/Sunday/MarketCloseDays , price will be displayed as #NA .
Using IFNA it could be customized as per user requirement eg. 'Holiday'
eg.
=INDEX(GOOGLEFINANCE(C3, "price", A3, A4), 2, 2)
=IFNA(INDEX(GOOGLEFINANCE(C2, "price", A2, A3), 2, 2), "HOLIDAY")
Upvotes: 0
Reputation: 4009
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)
Upvotes: 145
Reputation: 91
For me this worked:
=INDEX(GOOGLEFINANCE("CHFEUR"; "price"; DATE(2014;1;1););2;2)
Upvotes: 4
Reputation: 2616
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.
Upvotes: 9