Excel STOCKHISTORY Function

StockHistory Function Video

Subscribe to YouTube Channel for Exciting Tip & Trick On Office Applications

Summary

The STOCKHISTORY function extracts the historical data using the Microsoft Webservice about financial data points and loads in Excel as an array, which will (spill) expand and shrink array size according to the construction of the formula.

Goal

Retrieve financial stock historical data from web services

Result

Historical stock data-based in a single cell or in the dynamic array

Syntax

=STOCKHISTORY(stock, start_date, [end_date], [interval], [headers], [property0], [property1], [property2], [property3], [property4], [property5])

Arguments

stockEnter a ticker symbol
Stock Market: MSFT, AAPL
Currency Exchange: USDINR, SARCHF
start_dateThe beginning/start date for which data to be retrieved.  
When the interval is not 0 (daily), then in such case the date will be the first date of the period requested. (Eg. 13-06-2020 will read as 01-06-2020 only when it not 0)
[end_date] (optional)The latest/end date for which data to be retrieved
default it hold Today date
[interval](optional)Specifies the interval each data value to be represents
0 = daily, 1 = weekly, 2 = monthly.
default it hold show headers i.e 0
[headers](optional)Specifies whether to display headings
 0 = no headers, 1 = show headers, 2 = show instrument identifier and headers.
default it hold show headers i.e 1
[property0]
[property1]
[property2]
[property3]
[property4]
[property5]
(optional)
The property contains a different data point which as follows
 0 = Date, 1 = Close, 2 = Open, 3 = High, 4 = Low, and 5 = Volume

Example 01

In this example we will simply enter name of the stock and the date of stock to retrieve the historical information.

=STOCKHISTORY(StockName,StartDate)

Example 02

=STOCKHISTORY(StockName,StartDate,EndDate)

When you are referencing the value to cell & entering date as string, make sure that you enter the date as per your system local.

If you need to extract the information with different intervals can be passed in the 4th argument as explained above. check the video for more examples.

⬇️ Download Sample File << Click Here >>


Was the information helpful in this blog?

  • If yes, hit that share button and show the excitement to the world.
  • Subscribe to our free posts.

Join 2,923 other subscribers
  • If no, please let us know what to improve.

0 0 votes
Article Rating
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x