+ Reply to Thread
Results 1 to 6 of 6

Stock market info import from the web, given ticker

  1. #1
    Registered User
    Join Date
    07-30-2010
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    44

    Stock market info import from the web, given ticker

    I want to create a form where I input the stock ticker into a cell (say, GOOG) and click a button to import GOOG stock information from the web. I could start simple, so at this point it is not so important what gets imported as long as it works. I know how to create macros, and I know how to import from the web, but I am unsure how to combines these to get what I am trying to do. Any help is appreciated.

  2. #2
    Registered User
    Join Date
    07-30-2010
    Location
    Oregon
    MS-Off Ver
    Excel 2007
    Posts
    44

    Re: Stock market info import from the web, given ticker

    Further example: Let's say I choose GOOG for the ticker symbol. I want to retreive a table from http://www.google.com/finance?q=GOOG with the click of a button. If i change the cell containing GOOG to AMZN, it should update the import from GOOG to http://www.google.com/finance?q=AMZN.

  3. #3
    Forum Expert
    Join Date
    10-06-2008
    Location
    Canada
    MS-Off Ver
    2007 / 2013
    Posts
    5,528

    Re: Stock market info import from the web, given ticker

    I had this hanging around. Does it get you started?

    Regards
    John
    Attached Files Attached Files

  4. #4
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Stock market info import from the web, given ticker

    Excel has had a "Get Data from the Web" feature since Excel 2002.
    See one article at
    http://office.microsoft.com/en-us/ex...001045085.aspx
    another article is at
    http://articles.techrepublic.com.com...g=feed&subj=tr

    The problem is that some of the websites from the past have changed their design and no longer use web tables, that Excel needs to know where to select the data from. Yahoo still works but MSN and Google finance don't seem to work now.

  5. #5
    Forum Contributor
    Join Date
    07-13-2007
    Posts
    151

    Re: Stock market info import from the web, given ticker

    I recently answered a similar question on another forum. Here's some code I put together for pulling data from google finance. This code pulls the last price, but can be adapted to get anything.

    Good luck with it.

    Please Login or Register  to view this content.

  6. #6
    Forum Guru MarvinP's Avatar
    Join Date
    07-23-2010
    Location
    Woodinville, WA
    MS-Off Ver
    Office 365
    Posts
    16,168

    Re: Stock market info import from the web, given ticker

    Hey ShredDude,
    GREAT CODE!!!
    I stand corrected about getting stock prices. You simply took the source HTML code and extracted it without needing a table.
    THANKS - I've been looking for a method to do this for years.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1