There are two built-in options and they answer different questions. For a current price, use the Stocks data type: type the ticker in a cell, go to Data → Data Types → Stocks, then in another cell type =A1.Price.
That data type links the cell to live market data and exposes over forty fields including price, P/E ratio and market cap. For historical prices, use STOCKHISTORY: =STOCKHISTORY("MSFT",TODAY()-7,TODAY(),0,0,1) returns the closing prices for the last week, and the final 1 selects the close. It spills the results into the cells below and needs an internet connection.
The distinction matters: STOCKHISTORY data refreshes once per trading day after the market closes, so it gives you the latest close, not the price right now. Two limits worth knowing.
Both features require a Microsoft 365 subscription — they don’t work in Excel 2019, 2021, or the one-time-purchase Excel 2024. And the data comes from LSEG rather than the exchanges directly, with US equities close to real time and international exchanges delayed.
Yes, getting the stock’s latest price in Excel is possible. There are three major ways that I have found. In this tutorial, we are going to learn these ways in detail.
Let’s get started.
Use the STOCKHISTORY Function to Get the Stock Price
You might find this method the easiest one. Just note that STOCKHISTORY is only available in Excel for Microsoft 365 (Windows and Mac) with a Microsoft 365 Personal, Family, Business Standard or Business Premium subscription.

- Enter the STOCKHISTORY function in a cell.
- In the first argument, enter the stock symbol (here, we are using “MSFT”, which is the stock symbol of Microsoft) for which you want to get the stock price.
- After that, in the second argument, enter the date for which you want to get the stock price.
- Next, leave the end_date and interval arguments empty and enter 0 in the headers argument (0 means no headers).
- In the property0 argument, enter 1 to get the closing stock price for the specified date.
- In the end, close the function and hit Enter to get the result.
=STOCKHISTORY("MSFT","28-Sep-2023",,,0,1)
The moment you hit Enter, it returns the closing price of the stock for the date you have specified. As the headers argument is 0 and you have asked only for the Close property, you get a single value. If you leave out the properties, STOCKHISTORY returns a small table with the date and the closing price, and with headers set to 1, it adds a header row.
Note: The stock name we used in the formula is the Stock symbol or the Ticker symbol, which you can find on Google by searching with the company’s name.
You can also get the prices for a range of dates. The following formula returns a table with the date and the closing price for each trading day in September 2023, with a header row. The property numbers are 0 for Date, 1 for Close, 2 for Open, 3 for High, 4 for Low and 5 for Volume, and the columns appear in the order you list them:
=STOCKHISTORY("MSFT",DATE(2023,9,1),DATE(2023,9,30),0,1,0,1)
Using the DATE function (or a cell with a date) is safer than typing a date as text, because a text date depends on your regional date settings.

Use the Stock Data Type to Get the Stock Price
Microsoft added data types to help you get stock prices. The Stocks data type is available in Microsoft 365, and in Excel for the web with a free Microsoft account. The prices are delayed, so they aren’t meant for trading.
- Enter the Stock Name (Ticker Symbol) in a cell and then go to Data > Data Types > Stocks.

- After that, if Excel isn’t sure which stock you mean, a pane opens on the right side of the Excel window where you need to select the stock exchange to get the data from.

- Now, you have the name of the company listed in the cell. You also have an Add Column option, which you can use to add values related to the stock.

- From here, you need to select a different cell. And type the “=” sign, refer to the cell where you have the stock name, and then type a dot (.).

- You can select the value you want from this list in the cell. If you want to get the price, click on Price and hit Enter to get the result.

Applying the Stocks data type also shows you an Add Column button to open the list of columns to add. The prices don’t update on their own: go to Data > Refresh All (or right-click the cell > Data Type > Refresh) to get the latest values.

Install a Third-Party Add-In to Get the Stock Price
If you don’t want to use the methods discussed above, you can also use a third-party add-in to get the stock price.
- If you use Excel 2019 or 2021, go to the Insert Tab > Get Add-Ins.
- And if you are using Microsoft 365, go to the Home Tab and click Add-Ins (in some versions, it’s under the Developer Tab > Add-Ins).

When you click on the button, it shows you a dialog box where you need to click on “Store” and then click in the search bar to search for the Add-In you want to install.
Now, in the search bar, type “Stock Connector” and hit Enter to search. From here, click on the “Add” button to add the add-in to Excel.

Next, in a cell, enter the stock name (Stock ticker) of the company for which you want to get the stock value. Let’s say MSFT for Microsoft Corporation.
At the right side of your Excel Window, you have a pane for the Stock Connector Add-In, and once you select the cell with the stock name, click on the “Connect” button.

The moment you click on the connect button, it gets the stock price in the cell where you have the stock name and on the pane. You can specify the time interval on the right of the pane to refresh the stock price.

You can change the refresh interval from here.
Note: There are also some other add-ins that you can add to Excel if this add-in doesn’t work correctly.
Which Method to Use
- STOCKHISTORY: the best choice for past prices (a single day or a range of dates). It needs a Microsoft 365 subscription.
- Stocks data type: the best choice for the latest (delayed) price and other details like the 52-week high or market cap. It needs Microsoft 365 or Excel for the web.
- Add-in: for older versions of Excel that don’t have the first two methods.
Frequently Asked Questions
The Stocks data type isn’t in one-time purchase versions like Excel 2019 or 2021. In Microsoft 365, you also need one of the supported editing languages (English, French, German, Italian, Spanish or Portuguese) in File > Options > Language.
Why does STOCKHISTORY return the #NAME? error?
Your version of Excel doesn’t have the function. It’s only in Excel for Microsoft 365 with one of the subscriptions listed above, not in Excel 2021 or older.
Are the stock prices in Excel real time?
No. Microsoft says the stock information is delayed and provided as-is, so don’t use it for trading. Refresh the data to get the latest available values.
Your post states “latest”…
Do you mean “current”, like “ as of 2:15 pm”?
Or….do you mean “ latest” close?
Based on what I read, I believe you mean Latest close.
Is there any way, using Stockhistory, to return the “current” price?
[email protected]