Pull Stock Price from Yahoo Finance using Excel VBA

Pull Stock Price from Yahoo Finance using Excel VBA

If you need to pull down stock price to Excel – one option is to use a VBA function.  The following function uses the MSXML2.XMLHTTP object to simplify data retrieval.

If you add the function below to your Excel file (in the VBE) you can access the method by entering something similar to the following in one of the cells in Excel:

=xGetEquityPrice(“GOOG”)

So the above will retrieve the closing price for Google and assign it to the calling cell.

 

 

Authored by: admin

Leave a Reply

Your email address will not be published. Required fields are marked *