Excel Tutorial
Excel tutorials, quizzes & AI guides — all levels
RSS
  • Online Excel Exercises
  • Training
  • Excel Tests
  • Sitemap
  • Premium Quizzes
  • Shop
  • My account

Historical Stock Quotes with the STOCKHISTORY Function 🏦

Finance
Reading time: 2 minutes
Views: 5,877

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.

Related Articles

  • Live Quotes Stock in Excel
  • Bollinger Bands with Excel
  • Exchange rate in Excel

Frédéric LE GUEN

Data Type, stock, STOCKHISTORY

Leave a Reply Cancel reply

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

Most Viewed Posts

  • Displaying Negative Numbers in Parentheses in Excel (310,065)
  • Top 10 Excel Functions You Must Know (232,001)
  • How to make automatic calendar in Excel (212,775)
  • Dash for a zero in Excel automatically (190,812)
  • Converting a Date from YYYYMMDD to DD/MM/YYYY in Excel (171,033)
image excel exercises
Excel Exercises
image excel quizzes
Excel Quizzes

Historical Stock Quotes with the STOCKHISTORY Function 🏦

Reading time: 2 minutes
Views: 5,877

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.

Related Articles

  • Live Quotes Stock in Excel
  • Bollinger Bands with Excel
  • Exchange rate in Excel
Tags: Data TypestockSTOCKHISTORY

Frédéric LE GUEN

Leave a Reply Cancel reply

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

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net

Contact us
About me 
Privacy Policy

© 2022 – 2026 – excel-tutorial.com. All Rights Reserved.
Excel Tutorial is managed by majordome du net