Excel: stock prices from Google Finance (2024)

Here’s another method of getting stock prices into Excel. It’s part of a series: introduction and using MSN Money in Excel.

This time we’ll use the improved Query system in recent versions of Excel combined with data from Google Finance.

It’s a sad indictment of Microsoft Office that the best place to get stock data is Google.

Google’s version of Excel is Sheets and that has a nifty function that grabs stock prices right into the worksheet. Once you get the data into a Google Sheet, it can be automatically exported and grabbed by Excel.

It’s an indirect method but effective. Google’s GoogleFinance() function returns a lot of information about many global stocks and indexes. 18 different ‘attributes’ for each stock or index – too many to show in a single screen image (they’re listed later in this article).

Excel: stock prices from Google Finance (1)

To make this work, create a new Google Sheets from the online service (not the downloadable software). Go to Google Drive and make a new sheet.

Add to the sheet codes you want to look up, then a column with calls to GoogleFinance() to lookup those codes. For simplicity we’ll just lookup the price. We’ve added another column with the vital currency detail as well eg GoogleFinance(A3,’currency’)

Excel: stock prices from Google Finance (2)

Sheets works similarly to Excel for these operations. There’s an autocomplete in the function entry line and you can copy then paste to fill cells too.

Extra: you can view only the Sheet that Peter Deegan made for these examples at https://docs.google.com/spreadsheets/d/1ZPfVybR-8HNlo4qXjP14B5guXQiaFuw9iz3xOGgxdgY/edit?usp=sharing It’s a READ ONLY worksheet with editing not available, for obvious reasons. The usual 21st century disclaimers, use at your own risk etc.

Get full details on stock price integration with Excel inReal-Time Excel – get live stock prices, currency rates and more– less than US$12 or even a measly US$7 for Office-Watch.com subscribers (which is free).

Each column has a standard heading with the GoogleFinance() attribute in the 2nd row.

Once you have a simple sheet to start with, the next step is to publish it in a form that Excel can understand. Go to File | Publish to the Web

Choose the worksheet/tab you want to publish and select ‘Comma-separated values (.csv)’.

Excel: stock prices from Google Finance (3)

Make sure the ‘Automatically republish when changes are made’ option is on.

Copy the supplied link so you can use it in Excel. The link will download a .csv file with the data from the worksheet cells.

Switch to Excel (in this case Excel 2016 for Windows). Go to Data | New Query | From File | From CSV.

Excel: stock prices from Google Finance (4)

You’ll be presented with a standard File Open dialog but you don’t have to select a saved .csv file. Paste in the link from Google Sheets then click Open.

Excel: stock prices from Google Finance (5)

After a pause, Excel will show you what it’s downloaded and how it suggests dealing with the data. It should do an accurate job dealing with the incoming data.

Excel: stock prices from Google Finance (6)

Click Load and Excel will make a new worksheet for you.

Currency formatting

In the above example, you’ll see that the Sheets column was formatted with the correct symbols for each currency (Sterling and Euro).

Unfortunately, that doesn’t translate correctly. See the Sheets column on left and the Excel version on the right.

Excel: stock prices from Google Finance (7)

The solution is to change Sheets to Number format, with no currency symbols. Do any currency formatting in Excel.

Query Editor

The setup isn’t finished, right click on the query and choose Edit to fix a few things.

Excel: stock prices from Google Finance (8)

Make the first row of data into the column headings.

Excel: stock prices from Google Finance (9)

Change the sort order to put Symbols in alphabetical order. This makes them available for VLOOKUP() searches and a very welcome (ie overdue) inclusion in Excel.

Excel: stock prices from Google Finance (10)

Finally, go to Query | Properties and rename the query to something more helpful than the link text.

Click Close and Load to leave the Query Editor.

Now you have a ‘live’ data worksheet that you can use to lookup prices etc to insert into your own calculations.

Excel: stock prices from Google Finance (11)

Finding Stock Codes

Here’s how to find stock or index codes to use with the GoogleFinance() function.

Search Google Finance for companies across many different markets. The code will be in brackets after the company name.

Excel: stock prices from Google Finance (12)

For US companies, the market prefix (eg NYSE or NASDAQ) isn’t necessary. NYSE:WMT and WMT both work as do NASDAQ:MSFT and MSFT. But you might like to add it anyway, to distinguish the same company being listed on multiple exchanges.

International exchanges are also well represented. The exchange prefix is required.

London:

Excel: stock prices from Google Finance (13)

Frankfurt:

Excel: stock prices from Google Finance (14)

Hong Kong: number codes are used.

Excel: stock prices from Google Finance (15)

GoogleFinance()

If you just want the latest price, simply add the stock code eg GoogleFinance(“MSFT”) or GoogleFinance() function supports the following attributes to use with stock quotes. Use these in the second parameter of the function eg GoogleFinance(“MSFT”,”priceopen”):

  • “price”– Realtime price quote, delayed by up to 20 minutes.
  • “priceopen”– The price as of market open.
  • “high”– The current day’s high price.
  • “low”– The current day’s low price.
  • “volume”– The current day’s trading volume.
  • “marketcap”– The market capitalization of the stock.
  • “tradetime”– The time of the last trade.
  • “datadelay”– How far delayed the realtime data is.
  • “volumeavg”– The average daily trading volume.
  • “pe”– The price/earnings ratio.
  • “eps”– The earnings per share.
  • “high52”– The 52-week high price.
  • “low52”– The 52-week low price.
  • “change”– The price change since the previous trading day’s close.
  • “beta”– The beta value.
  • “changepct”– The percentage change in price since the previous trading day’s close.
  • “closeyest”– The previous day’s closing price.
  • “shares”– The number of outstanding shares.
  • “currency”– The currency in which the security is priced.

Google Finance should have a ‘Long Name’ attribute so you can confirm that the stock code is returning the data you intend. That’s especially true for codes such as the Hong Kong bourse which are numbers, not letters.

The function also supports Mutual Funds and historical data check out the GoogleFinance() help page for full info.

Excel: stock prices from Google Finance (2024)
Top Articles
Alaska Airlines News Hub - Alaska Airlines News
How to Installing OpenSSL on Windows 10, 11
English Bulldog Puppies For Sale Under 1000 In Florida
Katie Pavlich Bikini Photos
Gamevault Agent
Pieology Nutrition Calculator Mobile
Hocus Pocus Showtimes Near Harkins Theatres Yuma Palms 14
Hendersonville (Tennessee) – Travel guide at Wikivoyage
Compare the Samsung Galaxy S24 - 256GB - Cobalt Violet vs Apple iPhone 16 Pro - 128GB - Desert Titanium | AT&T
Vardis Olive Garden (Georgioupolis, Kreta) ✈️ inkl. Flug buchen
Craigslist Dog Kennels For Sale
Things To Do In Atlanta Tomorrow Night
Non Sequitur
Crossword Nexus Solver
How To Cut Eelgrass Grounded
Pac Man Deviantart
Alexander Funeral Home Gallatin Obituaries
Shasta County Most Wanted 2022
Energy Healing Conference Utah
Aaa Saugus Ma Appointment
Geometry Review Quiz 5 Answer Key
Hobby Stores Near Me Now
Icivics The Electoral Process Answer Key
Allybearloves
Bible Gateway passage: Revelation 3 - New Living Translation
Yisd Home Access Center
Home
Shadbase Get Out Of Jail
Gina Wilson Angle Addition Postulate
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Walmart Pharmacy Near Me Open
Marquette Gas Prices
A Christmas Horse - Alison Senxation
Ou Football Brainiacs
Access a Shared Resource | Computing for Arts + Sciences
Vera Bradley Factory Outlet Sunbury Products
Pixel Combat Unblocked
Cvs Sport Physicals
Mercedes W204 Belt Diagram
Mia Malkova Bio, Net Worth, Age & More - Magzica
'Conan Exiles' 3.0 Guide: How To Unlock Spells And Sorcery
Teenbeautyfitness
Where Can I Cash A Huntington National Bank Check
Topos De Bolos Engraçados
Sand Castle Parents Guide
Gregory (Five Nights at Freddy's)
Grand Valley State University Library Hours
Holzer Athena Portal
Hello – Cornerstone Chapel
Stoughton Commuter Rail Schedule
Selly Medaline
Latest Posts
Article information

Author: Carlyn Walter

Last Updated:

Views: 5811

Rating: 5 / 5 (50 voted)

Reviews: 81% of readers found this page helpful

Author information

Name: Carlyn Walter

Birthday: 1996-01-03

Address: Suite 452 40815 Denyse Extensions, Sengermouth, OR 42374

Phone: +8501809515404

Job: Manufacturing Technician

Hobby: Table tennis, Archery, Vacation, Metal detecting, Yo-yoing, Crocheting, Creative writing

Introduction: My name is Carlyn Walter, I am a lively, glamorous, healthy, clean, powerful, calm, combative person who loves writing and wants to share my knowledge and understanding with you.