Excel and stock quotes

Excel for Microsoft 365 Excel for Microsoft 365 for Mac Excel for the web More…Less

Your browser does not support video. Install Microsoft Silverlight, Adobe Flash Player, or Internet Explorer 9.

To insert a stock price into Excel, first convert text into the Stocks data type. Then you can use another column to extract certain details relative to that data type, like the stock price, change in price, and so on.

Note: The Stocks data type is only available to Microsoft 365 accounts or those with a free Microsoft Account. You must also have the English, French, German, Italian, Spanish, or Portuguese editing language added to Office Language Preferences.

  1. Type some text in cells. For example, type a ticker symbol, company name, or fund name into each cell.

  2. Then select the cells.

  3. Although it’s not required, we recommend creating an Excel table. Later on, this will make extracting online information easier. To create a table, go to Insert > Table.

  4. With the cells still selected, go to the Data tab, and then click Stocks.

  5. If Excel finds a match between the text in the cells, and our online sources, it will convert your text to the Stocks data type. You’ll know they’re converted if they have this icon for stocks: Linked record icon for Stock.

  6. Select one or more cells with the data type, and the Add Column button Add Column button will appear. Click that button, and then click a field name to extract more information. For example, for stocks you might pick Price.

  7. Click the Add Column button again to add more fields. If you’re using a table, here’s a tip: Type a field name in the header row. For example, type Change in the header row for stocks, and the change in price column will appear. Or type other field names like Last Trade Time, Previous Close, and Exchange.

Tips: 

  • To see all of the fields available for a company or fund, click the stock icon ( Linked record icon for Stock ) or select the cell and press Ctrl+Shift+F5.

  • If you see Question mark icon instead of an icon, then Excel is having a hard time matching your text with data in our online sources. Correct any spelling mistakes and when you press Enter, Excel will do its best to find matching information. Or, click Question mark icon and a selector pane will appear. Search for data using a keyword or two, choose the data you want, and then click Select.

  • You can also write formulas that reference data types or use the STOCKHISTORY function.

  • Stock information is delayed, provided «as-is», and is not for trading purposes or advice. See About our data sources for more information.

See also

  • More about linked data types

  • STOCKHISTORY function

  • FIELDVALUE function

  • #FIELD! error

Need more help?

Want more options?

Explore subscription benefits, browse training courses, learn how to secure your device, and more.

Communities help you ask and answer questions, give feedback, and hear from experts with rich knowledge.

There are a few ways to get stock quotes into Excel. For example, there are commercial add-ins that can download historical stock quotes into Excel and provide tools for analyzing the information, creating charts, and providing oodles of technical analysis functions. As of this latest article update (1/3/2022), the simplest method I know of is to use the new Stock data type, and I’ve created a free template to get you started.

Advertisement

Stock Quotes and Portfolio Template

for Excel (Office 365)

Excel Stock Quotes and Portfolio Template

If you want refreshable Stock quotes directly within Excel, upgrading to Office 365 may be worth it. The new Stock data type makes it a piece of cake to get stock data into Excel. To see if your version of Excel works with this new feature, download the above template. If the table of stock quotes works, and can be refreshed via Data > Refresh All, you are good to go!

This template also contains a very basic stock portfolio worksheet that uses VLOOKUP to get the current price based on the stock symbol. Note the disclaimer (not for professional or stock trading purposes or advice).

Stock Quotes in Excel via Google Sheets

The GOOGLEFINANCE function in Google Sheets allows you to get delayed quotes for stocks and mutual funds. After creating a table for the symbols that you want, you can publish the sheet as a web page (via File > Publish to the Web). You can then import the data into Excel via a web query that uses the Google Sheet as the data source. To do this, follow the steps below:

Step 1: Start with a Google Sheets Template

We’ve created a Google Sheets template that uses the GOOGLEFINANCE function to display stock quotes. You can make a copy of that template and update it with your own list of stocks and mutual funds.

GET TEMPLATE

Step 2: Add Stocks and Mutual Funds

To add a new stock symbol to the Google Sheet, type the symbol in column A, then copy the formulas from previous rows.

Copy Formulas in the Stock Quotes Google Sheets Template

Step 3: Publish as a Web Page

To connect your Google Sheet document with Excel, first publish your Google Sheet document to the web. In Google Sheets, go to File > Publish to the Web.

From the dropdown box, select the StockQuotes worksheet. Then click the «Publish» button and copy the URL that is shown highlighted, like in the screenshot below.

Google Sheets - Publish to the Web and Copy URL

This will make the worksheet viewable to anybody who ends up with the link to it. For security, you should only use the Google Sheet to list the stock quotes. Don’t add other personal financial data to the published sheet.

Step 4: Import into Excel via a Web Query

Now you can use the URL of the published Google Sheet to import the data into Excel. Create a new Excel worksheet, then go to Data > Get External Data > From Web.

Excel - Data From Web

Paste the URL you copied from Google Sheets into the Address bar, then finish the wizard.

Create Excel Stock Quotes Web Query

This will put your Google Sheet data directly into Excel:

Excel Stock Quotes Web Query Results

To update the web query, go to Data > Refresh All.

With the data now in Excel, you can use VLOOKUP or INDEX/MATCH functions to reference the data in the web query. For example use a formula like =INDEX(D:D,MATCH(«MSFT»,B:B,0)) to get the Price for MSFT.

MSN Money Stock Quote Add-in

The old way to work with stock quotes in Excel was the free MSN Money Stock Quote Add-in for Excel versions 2002 and 2003 (and 2007). But, that add-in no longer works. The old MSN data source is no longer accessible (https://www.msn.com/en-us/money/quoteslookup). Instead, Excel uses the new Stock data types, like those included in my template above.

Historical Stock Quotes via Yahoo Finance

It is possible to create a web query to access historical stock quotes from Yahoo! Finance or some other site, but I have found this approach to be somewhat cumbersome. Perhaps a better way to do this is to download historical stock quote data into Excel from Yahoo Finance:

After you enter the symbol and click the Go button, choose the Time Period you want and then press the «Download » link at the top of the table. This will download the data within the entire date range as a .csv file rather than just the stock quote data shown on the page.

More Options

  • Import data from external data sources at support.office.com
  • Excel data types: Stocks and Geography at support.office.com.
  • Stock Quotes in a Google Spreadsheet — at support.google.com — Google got it right. You can use the =GOOGLEFINANCE function to get stock quote data into your Google Spreadsheet directly from Google Finance. View an example template by Google here.
  • Get Stock Quotes using Excel Macros — at chandoo.org — Describes a way to use VBA to get stock quote data from Yahoo Finance

Disclaimer: This content on this page is meant for educational purposes only. Please consult your financial advisor or lending institution before making any final financial decisions.

Microsoft recently updated the built-in tools for retrieving stock quotes into Excel. If you’re typing closing prices into Excel manually, this article may be able to help you get it done faster. Specifically, we’ll talk about how the Stock data type retrieves current quotes and related information, and how Power Query can retrieve historical stock quotes from the web. We’ll take them one at a time.

Note: This article is presented with Excel O365 for Windows; not all versions of Excel include the features discussed.

Current Prices with the Stock Data Type

Let’s say you have a handful of tickers and you want to view their current prices or related information. Perhaps your list is stored in a table (Insert > Table) and looks like Figure 1.

(Note: converting your ticker list into a Table isn’t required, it just makes this feature easier to use).

You can select the tickers, then click the Data > Stocks command in the Data Types group. When you do, Excel attempts to convert those static text values into stocks (Figure 2).

The little icons indicate Excel has successfully found the ticker symbols and converted them into stocks. So, what is so special about the stock data type? It retrieves a rich collection of market data—including current price, volume, high, low, company name, company description, number of employees and much more. To reveal these additional attributes, just click the little stock icon to the left of the company name and you’ll see a pop-up card that contains related data. Or, if you want to view the related data in cells, just click the little Add Data icon in the upper right. For example, we can select price, high and low from the list and Excel retrieves the corresponding values (Figure 3).

You can manually refresh the values any time by right-clicking any of the stock icons and selecting Data Type > Refresh. If you had previously used the MSN Money Central Investor Stock Quotes connection, this is the replacement feature and provides much more information.

But what if you want to retrieve historical quotes? For that, we can import data from a
corresponding web page with Power Query.

Historical Prices with Power Query

At the time of this article, the Stocks data type contains current quotes only. So, if we want historical quotes, we’ll need to turn to the web. Pull up your favorite historical quotes web page or do a web search. In this article, we retrieve historical quotes from yahoo.com.

The Yahoo service works well with Power Query and has a logical URL structure that is easy to customize for your desired ticker symbol. It uses the format:

https://finance.yahoo.com/quote/YOUR-TICKERHERE/history/

Since Microsoft’s ticker is MSFT, we could type the following URL into any web browser to see the historical quotes:

  • https://finance.yahoo.com/quote/MSFT/history/

We test the URL for our desired ticker by entering it into a web browser. If the page works, we’ll see a table full of daily prices. Now, there are a few ways to get data displayed on the web page into Excel. We could select the range on the web page, copy (Ctrl+C) the info, then open an Excel workbook and do a Paste or Paste Special.

Depending on the webpage formatting, this may or may not work well. If it does, this quick copy/paste method may be all we need.

Another option is to download a file from that webpage (if available) and then open it with Excel. This option typically avoids the formatting issues that can occur with copy/paste. In the case of the Yahoo page, there is a Download Data link that exports a CSV file that can be opened with Excel. And, if this was a one-time project, this option may be sufficient.

But, if this was something we needed to update on an ongoing basis, another option is to use Power Query. Going forward, rather than browse to the webpage to view and download or copy the data, we can just click Refresh from within Excel. To do so, click Data > From Web in the Get & Transform group (not the legacy Get External Data group). This will open Power Query’s From Web dialog. You simply paste or type your desired URL (Figure 4).

This will display Power Query’s Navigator dialog where you’re provided a list of importable items, which are essentially various tables that appear on the web page. We click through the list of tables until we see the one we want to import. For example, in our case, Table 2 holds the historical quotes (Figure 5).

With the desired table selected, we just click the down arrow on the Load button and select Load To. In the resulting dialog, we select Table and … the results are loaded into the specified worksheet (Figure 6).

Now, the nice thing about using Power Query is that next time we need to retrieve updated historical quotes, we can simply right-click any cell in the results table and select Refresh. Power Query essentially retrieves updated values from the original URL. In Excel, we see the updated table rows.

I hope these methods provide an efficient way to retrieve current and historical stock quotes into your Excel file. And remember, Excel rules!

Download PC Repair Tool to quickly find & fix Windows errors automatically

Most of us use Microsoft Excel in our daily life in many ways. We use it to keep track of tasks to be completed using color coding and people dealing with business, use it to keep track of products brought and sold and everyone uses it in some or the other way. Excel functions make our job easy in minimizing the task we do. There are many built-in formulas and you can even create your own custom functions to extend the functionality. Apart from just using it for regular stuff, you can even pull or fetch stock quotes in excel. So let us see how to get Stock Quotes in Excel.

Get Stock Quotes in Excel

To fetch stock quotes in excel, you do not need to install any additional add-on to your excel sheet. You can use MSN MoneyCentral Investor Stock Quotes, the built-in connection of Excel, and pull the stock quotes.  I will take you through the steps to be followed to achieve this.

Open the Excel sheet and tap on the “Data” tab. Then, click on “Connections” which opens “Workbook Connections” and click on “Add” button.

connections in data tab

Select “MSN MoneyCentral Investor Stock Quotes” and double click on it.

Add MSN MoneyCentral Investor Stock Quotes

Click on the “Properties” to open “Connection Properties” pop up. Check the option “Enable background refresh” and any other options as you require. Click on “Ok” and “Close” button.

Tap on the “Data” tab once again and click on “Existing Connections”. Select the connection you have just added now and click on “Open” button or you can double click on the connection.

Existing Connections

It opens the “Import Data” popup and asks you where to put the data. By default, it shows $A$1 (Cell ‘A1’) as the starting cell. You can even select the range of cells by just dragging the mouse over the cells and click on the “Ok” button.

Read: How to add a Stock Ticker to Windows Desktop.

It asks you to ‘Enter Parameter Value’ and add stock quotes separated by a comma. Check the options “Use this value/reference for future references” and “Refresh automatically when cell value changes”.

get stock quotes in to excel

To refresh the data, select the cell that has data and tap on “Data” tab. Select “Refresh All” followed by “Refresh”.

This is the easy way to get stock quotes in excel using MSN Money. You can even view and chart and news regarding each stock quote. No need to create any macro or add any third-party add-in. Just add the built-in connection and it pulls stock quotes in excel simply.

Were you aware of this method to pull stock quotes in Excel?

Now see how you can Add Windows Calculator to Excel Quick Access Toolbar.

Sridhar is a Software Engineer who loves to stay updated with developments in the world of technology. He is fond of writing everything related to Internet, Computers and Mobile and Desktop Operating Systems.

Excel is one of the best platforms to do stock quote analysis. However, you traditionally had to pull this data either manually, or using third party tools. Now, you can do this using built-in Excel features if you are running Office 365. In this article, we are going to show how to get Excel stock quotes, along with tips and tricks about the new Data Types feature.

In September 2018, Microsoft has announced new features like the Data Types, and Dynamic Arrays, and dynamic array functions to go with these additions. The Data Types feature allows pulling data dynamically from online sources. Currently, this function has 2 subcategories called: Stock and Geography.

Note: Data Types have been released to all Windows Office 365 subscribers in March 28, 2019. Thus, you need to be an Office 365 subscriber to access this features.

Download Workbook

Step 1: Enter company names or stock codes

All you need to do is enter the companies names or stock codes you want to use. Excel will automatically find the matching stock quote information. Enter names into a column and select them.

Optional: Convert your range into a table by pressing Ctrl + T. Aside from a table‘s own advantages, you will automatically get titles of the information you will get online.

Step 2: Click Stocks in Data tab

Next step is defining the selections as a Data Type. With company names and/or codes selected, go to the Data tab, and then click Stocks.

Step 3: Verify the stock names

After clicking the Stocks icon, you will see cell values replaced with the stock codes. If Excel can’t recognize any of the names, you will see a question mark icon instead. If this happens click on the name and check the suggestions in the right-side panel.

Step 4: Add stock exchange information

You will see a new icon if you select a cell linked with a Data Type. This icon name is Add Column which lists available columns related to Data Type.

Click Add Column and select the information type you want to add your table. The titles of the columns will be added when you do so. This won’t happen if you do not use a table.

(Alternative) Step 5: Add information by formula

You can also add any information by typing in the relevant codes. Select a cell next to your table, and start with an equal sign. Then enter the reference of a Data Type cell, and follow up with a period (.) to get the list of data.

Step 6: Refresh

Real time stock quotes Excel will give you will be a little delayed (currently about 15 minutes), but you can refresh the workbook to get updated values. There are 2 ways to do this:

  1. Click the Refresh All icon under the Data or Table Design tab
  2. Press Ctrl + Alt + F5

Unfortunately, there’s no Excel formula that can add stock quotes for you. However, there is a workaround for that which can help you get what you’re after. In a previous post, I covered how to pull stock quotes using Google Sheets which is able to pull in prices and all sorts of other data. And in this post, I’ll show you how to get the data from Google Sheets into Excel.

In essence, Google Sheets is your data source or database, and you’re going to import that into Excel. It’s not specific to stock quotes, but it’s an example of how you can accomplish the same thing. So first up, you want to create your file in Google Sheets using that earlier post as a guide. Here’s an excerpt of what my file looks like in Google Sheets:

google sheets stock prices

Once you’re ready, it’s time to link your Excel file to that Google Sheets file, and here’s how to do that:

How to Link Google Sheets to Excel

  1. On the File menu, click on the button to Publish to the web
publish to web google sheets

On the next screen, you should see something like this:

publish to web google sheets

2. Select the tab that you want to export under the Link section and change Web page to Comma-separated values (.csv) and click on the Publish button, that will generate a URL:

publish to web google sheets

3. Copy the URL that was generated in Step 2 and go back into Excel and under the Data tab click on the From Web button which is in the Get & Transform Data section

excel import google sheets

Paste it into the next screen’s URL field and click OK

import excel google sheets

On the next page you should see a preview of your data and if it looks okay then click on the Load button.

import excel google sheets

What you should see afterwards is what was on your Google Sheets tab from earlier:

import excel google sheets

And there you have it, your data from Google Sheets linked into Excel. If you make changes to your Google Sheets file, or if you want to refresh the stock quotes, right-click anywhere in the Excel sheet and select Refresh. Note that sometimes it may take some time before the file is updated on Google Sheets and before you’ll see any changes that you have made to the file.

It may not be an ideal solution if you’re looking to get stock quotes, but it gets the job done and avoids you having to try and find a complex formula or macro to pull the data that you want. You can use the Excel sheet with your Google Sheets data as a database and then lookup the stock prices from another sheet. The benefit of using Google Sheets is that you can have the best of both worlds – putting data online that you can easily update, and not be limited to Google Sheets and be able to edit and manipulate it as you need to in Excel.

Word of caution: if you delete or move around data in Google Sheets it could cause issues, especially if columns are missing and when you go to refresh it cannot find them anymore. If there is an error as a result of it or if you need to change the source, you’ll want to edit the query. When you click on the data in Excel you should see a section for Queries & Connections where you can edit the query. This is where you can select which data you want to include as well as change the source that you are pulling from. However, if it may be easier to just re-publish the data.


If you liked this post on How to Add Stock Quotes Into Your Excel Spreadsheet, please give this site a like on Facebook and also be sure to check out some of the many templates that we have available for download. You can also follow us on Twitter and YouTube.

How does it work?

Once you install MarketXLS, a new menu will show up in Your Excel with many new functions that are added to Excel. You can use the function like =qm_stream_last (“MSFT“) or =qm-stream_last(B2) where cell B2 is the one that contains the stock symbol. As soon as you do that, the stock prices will start showing in your Excel cell. Not only the last price, but you can also get the full quote of the stock using the functions like =qm_stream_ask, =qm_stream_bid, and so on.

These functions not only work with stocks but also can work with stock options, currencies, and any other ticker symbol you have access to.

real-time stock quotes in excel

Click image to enlarge

How many ticker symbols can you stream in real-time?

The streaming data support up to 300 ticker symbols for simultaneous streaming. MarketXLS has other functions, which are the “refresh on-demand” functions. Refresh on-demand functions call the real-time stock prices in your Excel and require a click on the refresh button on the MarketXLS menu.

Unlike the streaming function, you can refresh more than 300 stocks or options at one time. If, for some reason, you would like to stop streaming and see a snapshot of quotes at a point in time, simply uncheck the streaming checkbox, as shown below.

live stock prices in excel

Click image to enlarge

The data will still be a live snapshot of the prices from the market. If you are looking for a way to quickly get the live stock quotes in Excel with a very reliable source, then look no further.

We are so confident about the streaming real-time stock quotes in excel functions that we provide a 30-day money-back guarantee with MarketXLS. The stock price quotes will always match the price that you see in your brokerage accounts, and you can rely on the numbers.

We have performed many optimizations to make sure that the flow of the stock quotes is seamless. And also that the plugin does not hinder your ability to perform other tasks Excel.

Check out MarketXLS today The #1 Excel-based Investment Research Solution for Serious Investors

MarketXLS works with any version of Excel like Excel 2007, 2010, 2013, 2016, 2019, and Office 365. MarketXLS, at this time, only works with Windows-based machines.

Понравилась статья? Поделить с друзьями:
  • Excel and show formulas
  • Excel and sheet name
  • Excel and select all
  • Excel and runtime error
  • Excel and round function