The STOCK() function is designed to automatically retrieve stock prices directly from the Yahoo Finance website (finance.yahoo.com) by the specified stock ticker (for example, AAPL, NVDA) and selected date. It supports both historical quotes and real-time values.
This function is useful for creating stock trackers in Excel (LibreOffice Calc) and will be beneficial for investors, traders, and financial analysts.
=STOCK(Ticker; [Date]; [Indicator])
The STOCK() function is simple to use. You just need to specify the cell with the stock code and Excel (Calc) will automatically import its price for the specified date:
=STOCK(Ticker; Date)
We will get the following result:
In this example, the following values are used:
In this example, the following values are used:
Corresponding data from the Yahoo Finance website:
You can use the STOCK() function by installing the YLC Utilities extension.
After that, this function will be available in all files opened in Excel (LibreOffice Calc).