guagay_wk
guagay_wk

Reputation: 28030

How to get the price of a stock at a particular date from Google Finance?

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

Answers (5)

srt111
srt111

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.

  1. Market close days displayed as #NA

=INDEX(GOOGLEFINANCE(C3, "price", A3, A4), 2, 2)

  1. Market close days displayed as "HOLIDAY"

=IFNA(INDEX(GOOGLEFINANCE(C2, "price", A2, A3), 2, 2), "HOLIDAY")

enter image description here

Upvotes: 0

makhan
makhan

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

GPMASH
GPMASH

Reputation: 91

For me this worked:

=INDEX(GOOGLEFINANCE("CHFEUR"; "price"; DATE(2014;1;1););2;2)

Upvotes: 4

L.Butz
L.Butz

Reputation: 2616

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.

Upvotes: 9

TechySoul
TechySoul

Reputation: 341

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

Upvotes: 34

Related Questions