Google Sheets – How to Import Historical Open Price with GOOGLEFINANCE

formulasgoogle sheetsgoogle-financeimport

For some reason, I can't get the google finance function to work with any open-price lookups I do.

For example:

=GOOGLEFINANCE("AAPL","priceopen", DATE(2019,4,12))

comes back as #N/A with message:

{Error|Function GOOGLEFINANCE parameter 2 value is invalid for the symbol specified.}

I change the dates and tickers, but it never works.

What am I doing wrong?

Best Answer

This actually kind of makes sense. If the 2nd parameter of GOOGLEFINANCE is "priceopen" it tries to fetch the open price but by adding a historical date to it DATE(2019,4,12) the 2nd parameter is confused because on that date there is no open price. On that date is only closed price at this moment. In other words: "the historical open price" is called "open".

=GOOGLEFINANCE("AAPL", "priceopen")

0

=GOOGLEFINANCE("AAPL", "open", DATE(2019,4,12))

0

=INDEX(GOOGLEFINANCE("AAPL", "open", DATE(2019,4,12)), 2,  2)

0