What is the STOCKHISTORY function in Excel? The STOCKHISTORY function retrieves historical data about a financial instrument and loads it as an array, which will spill if it’s the final result of a formula. This means that Excel will dynamically create the appropriate sized array range when you press ENTER. You get historical stock price information based on a given symbol and date range.
The STOCKHISTORY function requires a Microsoft 365 Personal, Microsoft 365 Family, Microsoft 365 Business Standard, or Microsoft 365 Business Premium subscription.
Here is a YouTube video called Get Stock History in Excel with STOCKHISTORY Function.
Which stock exchanges are supported? Have a look at the article About the Stocks financial data sources to find out.
Here is a Canadian stock called Enbridge.
As far as I know, STOCKHISTORY does not take dividends into account.