Excel 2024: Get Historical Stock History from STOCKHISTORY


July 23, 2024 - by

Excel 2024: Get Historical Stock History from STOCKHISTORY

In June 2020, Microsoft 365 added the new STOCKHISTORY function. It will pull historical stock data after the market has closed. The syntax is as follows:

=STOCKHISTORY(stock,start_date,end_date,interval,headers,properties1,...)


For the stock, use any ticker symbol. The start date can be a cell containing a date or text such as "1-1-2021". The end date is assumed to be today, or you can enter another date. For the interval, use 0 for daily, 1 for weekly, 2 for monthly. The headers argument can be 0 for no headers, 1 for a single row of headers or 2 for the stock name and then headers. Properties1 through Properties6 specify which fields and the order they should appear: 0 is Date, 1 is Close, 2 is Open, 3 is High, 4 is Low, 5 is Volume. You can specify from 1 to 6 properties in any order. 

Note that the stock data is updated once a day, a few hours after the market closes.




This article is an excerpt from MrExcel 2024 Igniting Excel

Title photo by Алекс Арцибашев on Unsplash