Historical Stock Quotes with the STOCKHISTORY Function 🏦

Last Updated on 15/11/2024
Reading time: 2 minutes

Excel can help you get historical stock quotes easily with the STOCKHISTORY function. Let's see how to use it.

Historical Stock Quotes and STOCKHISTORY

STOCKHISTORY(stock, start_date, [end_date], [interval], [headers], [property1], [property2], …)

  1. Stock: The stock ticker symbol, explanations in the next paragraph.
  2. Start_date: The starting date for the historical data
  3. End_date (optional): The ending date for the historical data.
  4. Interval (optional): The frequency of the data. Possible values are:
    • 0: Daily. If omitted, this value is used by default.
    • 1: Weekly
    • 2: Monthly
  5. Headers (optional): A number to specify whether to include headers and which headers to include:
    • 0: No headers
    • 1: Show headers. If omitted, this value is used by default.
    • 2: Show instrument identifier and headers
  6. Property1, property2, … (optional): Additional properties to include in the returned data. Possible properties are:
    • 0: Date
    • 1: Close (default if no properties are specified)
    • 2: Open
    • 3: High
    • 4: Low
    • 5: Volume

For example, use this formula to get the last 90 days of stock prices. The columns are 0, 2, 3, 4, 1 in order.

Example of the stockhistory function with the ticker MSFT

To get only the Date and Close price, use this formula:

Stockhistory with the date and the closing

What is a Ticker?

A ticker symbol is a unique code assigned to a publicly traded company for stock exchange identification. It represents the company’s name in shorthand and helps investors and traders track and trade stocks easily. In Europe, another system for the codification of equities is the ISIN code.

You can find them on official websites like nasdaq.com or nyse.com. You can also use Excel's Data Type feature to find the ticker symbol by entering the company name. For this tutorial, we will use the ticker "MSFT".

=STOCKHISTORY("MSFT",

  • If you use two currency codes instead of a ticker, you can retrieve the historical exchange rate between the two currencies 😀

Start Date

  • Type dates in quotes, like "01/01/2014".
  • Or, use the TODAY function to calculate dates: =TODAY()-90

=STOCKHISTORY("MSFT", TODAY()-90

End Date

  • This is optional. Without it, only the start date will be used.
stockhistory returns only one value

Adding Properties

  • Adding properties is simple.
  • When you add a comma in the function, it shows a tooltip with all the options for this specific property
  • You can add as much argument as you want
select properties for stockhistory

Tutorial Video

Watch this video to learn more about using the STOCKHISTORY function in Excel.

Leave a Reply

Your email address will not be published. Required fields are marked *

Historical Stock Quotes with the STOCKHISTORY Function 🏦

Reading time: 2 minutes
Last Updated on 15/11/2024

Excel can help you get historical stock quotes easily with the STOCKHISTORY function. Let's see how to use it.

Historical Stock Quotes and STOCKHISTORY

STOCKHISTORY(stock, start_date, [end_date], [interval], [headers], [property1], [property2], …)

  1. Stock: The stock ticker symbol, explanations in the next paragraph.
  2. Start_date: The starting date for the historical data
  3. End_date (optional): The ending date for the historical data.
  4. Interval (optional): The frequency of the data. Possible values are:
    • 0: Daily. If omitted, this value is used by default.
    • 1: Weekly
    • 2: Monthly
  5. Headers (optional): A number to specify whether to include headers and which headers to include:
    • 0: No headers
    • 1: Show headers. If omitted, this value is used by default.
    • 2: Show instrument identifier and headers
  6. Property1, property2, … (optional): Additional properties to include in the returned data. Possible properties are:
    • 0: Date
    • 1: Close (default if no properties are specified)
    • 2: Open
    • 3: High
    • 4: Low
    • 5: Volume

For example, use this formula to get the last 90 days of stock prices. The columns are 0, 2, 3, 4, 1 in order.

Example of the stockhistory function with the ticker MSFT

To get only the Date and Close price, use this formula:

Stockhistory with the date and the closing

What is a Ticker?

A ticker symbol is a unique code assigned to a publicly traded company for stock exchange identification. It represents the company’s name in shorthand and helps investors and traders track and trade stocks easily. In Europe, another system for the codification of equities is the ISIN code.

You can find them on official websites like nasdaq.com or nyse.com. You can also use Excel's Data Type feature to find the ticker symbol by entering the company name. For this tutorial, we will use the ticker "MSFT".

=STOCKHISTORY("MSFT",

  • If you use two currency codes instead of a ticker, you can retrieve the historical exchange rate between the two currencies 😀

Start Date

  • Type dates in quotes, like "01/01/2014".
  • Or, use the TODAY function to calculate dates: =TODAY()-90

=STOCKHISTORY("MSFT", TODAY()-90

End Date

  • This is optional. Without it, only the start date will be used.
stockhistory returns only one value

Adding Properties

  • Adding properties is simple.
  • When you add a comma in the function, it shows a tooltip with all the options for this specific property
  • You can add as much argument as you want
select properties for stockhistory

Tutorial Video

Watch this video to learn more about using the STOCKHISTORY function in Excel.

Leave a Reply

Your email address will not be published. Required fields are marked *