Wednesday, November 12, 2008

Pulling Company Financial Statements from Yahoo Finance

Here's an interesting $50 Project I just completed. The request was for a spreadsheet that would allow the user to enter a stock ticker symbol, and it would go out to the Yahoo Finance website and pull back either the quarterly or annual versions of the income statement, balance sheet, or statement of cash flows for the company. I think I've accomplished that pretty well.

I even did some formatting to make them look similar to those on Yahoo Finance. Here's what the Yahoo Finance version of the Cash Flow statement looks like...


(click on the image above to see a larger version)

And here's the Excel version ...


(click on the image above to see a larger version)

I even did a little "...gathering data...one moment please..." status message while the query is running.


(click on the image above to see a larger version)

This is another example of a web query project that I did where instead of using the CreateObject("MSXML2.ServerXMLHTTP") method, I actually initiate an Internet Explorer session behind the scenes using the CreateObject("InternetExplorer.Application") method. Using this method was preferable for this project, as I was able to identify the table containing the financial statements and pulled the "inner HTML" from it rather than having to use Regular Expressions to tease out each data point.

I thought it was interesting, but being the Excel_Geek, I probably would.

Excel_Geek Insiders subscribers, your file is on its way!

Later,

Excel_Geek