In many configurations, STOCKHISTORY returns anarrayof values thatspillonto the worksheet into multiple cells.
However, in this case, we want only a single result for each symbol.
The formula is tied to the date entered in cell F5, which can be changed at any time.
STOCKHISTORY retrieves historical stock price information based on a given symbol and date range.
If the date in cell F5 is changed, STOCKHISTORY retrieves a new set of close prices.
The primary purpose of STOCKHISTORY is to get the history of a financial instrument over time.
The result is an array of values that spill onto the worksheet into…