August 15, 2009

Download Stock Quotes Into MS Excel

I recently ran into a problem downloading stock quotes into my investments spreadsheet. I used this technique to pull stock quotes from Yahoo!Finance directly into my investment tracker. There are alternatives, but this was the cleanest way I found to extract just the trade quote iteself without a lot of the other stats the come along with stock quotes elsewhere.

However, I ran into a problem over the past month. The web query stopped working - it looks like Yahoo has redesigned their Yahoo!Finance web page and the Excel web query tool no longer see the stock data in a table format is therefore is unable to import it properly.

I was able to string up a way to extract the quotes, and still put them in a cell like I have have been doing, with a little extra background work.

First I used the same technique to pull in the stock quotes, but I changed from importing the web page to importing the comma seperated version of the quotes via the link at the bottom of the page.


http://download.finance.yahoo.com/d/quotes.csv?s=MKL&f=sl1d1t1c1ohgv&e=.csv&d=v5

This gave me a cell for each stock with all the stats stock symbol, last quote, last trade, etc. Here is an example of the string:

MKL,308.50,"8/13/2009","4:01pm",0.00,N/A,N/A,N/A,0

Then I just had to use some functions to whittle it down to just the last trade value and convert it to a number in my spreadsheet:

=VALUE(RIGHT(LEFT(T31,SEARCH(",",T31,SEARCH(",",T31)+1)-1),SEARCH(",",T31,SEARCH(",",T31)+1)-SEARCH(",",T31)-1))
*Where T31 points to the cell with the stock information string above

Takes an extra cell to do the parsing, but it still allows me to get the data I need to maintain my investment tracking stats.

Anyone found easier ways to get stock quotes into tracking spreadsheets?


Similar Entries

Investment Performance June 2010 (-5.64%) (Jul 23, 2010) This is an ongoing monthly update on how our equity investments are performing. Please see this background on the investment tool I developed and how I am using it to track our performance against a benchmark to measure our progress...

Investment Performance May 2010 (-8.13%) (Jun 14, 2010) This is an ongoing monthly update on how our equity investments are performing. Please see this background on the investment tool I developed and how I am using it to track our performance against a benchmark to measure our progress...

Investment Performance April 2010 (+2.54%) (May 09, 2010) This is an ongoing monthly update on how our equity investments are performing. Please see this background on the investment tool I developed and how I am using it to track our performance against a benchmark to measure our progress...

Comments (4)


The MSN Stock Quote add-in for MS Excel works well and pulls data directly from the web into your spreadsheet.

http://www.microsoft.com/downloads/details.aspx?FamilyID=485FCCD8-9305-4535-B939-3BF0A740A9B1&displaylang=en

It's made for Excel 2002/2003, but some seem to indicate it works for Excel 2007.

I find Google spreadsheets to be perfect for this. They include functions to automatically fetch quotes, anything from volume, price, change, etc.

If you want a "hardcopy" (i.e. import it into Excel) you can download almost format.

I'm using this excel addin for Yahoo Quotes.
http://finance.groups.yahoo.com/group/smf_addin/files/Templates%20and%20Examples/RCHGetYahooQuotes/

I used to use the MSN Stock Add-in for Excel, but switched to Google Docs. A good thing is that I don't have to carry the excel file with me. I can edit the document anywhere and I publish charts on my Google Page.

Post a comment

(Comment moderation enabled.)

About 2millionblog.com

A personal finance weblog of my journey to reach my goal of $2 million + the value of my primary residence.
Current Net Worth: $663,869

Sponsors

Lending Club - Start Investing Online Today!

New Personal Finance Articles



Prepaid Credit Cards The READYdebit prepaid credit card is designed to help build or re-establish credit with no credit check required.

Personal loans for every need and budget. Apply for fast cash loans for whatever your needs are including loans with no credit

Moneynow is your one-stop for all bad credit loans including payday loans, personal loans and signature loans.

Free debt advice on UK debt management plans and IVAs. Contact Debt Response for an immediate consultation.

A payday loan is a short-term financial cash advance product; use it wisely.

Compareandsave.com best buy financial services; compare credit cards, loans, mortgages, car, home and pet insurance

Compare Australian home loans or learn more about refinancing your mortgage.

Get help managing your debts with debt help & advice for UK consumers.

Advertise Here


PF Blogs