+ Reply to Thread
Results 1 to 3 of 3

web query and yahoo finance stock quotes

  1. #1
    Registered User
    Join Date
    10-19-2011
    Location
    Charlestonm, SC
    MS-Off Ver
    Excel 2003
    Posts
    4

    web query and yahoo finance stock quotes

    Newby here. I'm tracking stocks from finance.yahoo.com, and I need to get the adjusted closing price for yesterday. I can do this by using a web query, pasting the results into a separate worksheet, and then linking the desired cell into another worksheet. The problem is that I want to track a large number of stocks, and I really don't want to have 100 worksheets. Is there a way to do a web query for a specific item in a table?

    Thanks in advance for any ideas.......

  2. #2
    Administrator 6StringJazzer's Avatar
    Join Date
    01-27-2010
    Location
    Tysons Corner, VA, USA
    MS-Off Ver
    MS365 Family 64-bit
    Posts
    24,705

    Re: web query and yahoo finance stock quotes

    I'm a little confused by what you're describing as the layout of your data. If you do a web query, why do you need to copy & paste the data to another worksheet? Why not just link directly to the data provided by the web query?

    You can do as many queries as you want on a single worksheet, then link the particular cells you're interested in on another. I don't see a need for more than two worksheets.

    My understanding of how web queries work is that you can only identify a table to import, based on Excel's analysis of the HTML code. You cannot identify a single cell in the table to import. There may be such a way to do something like that using VBA but I have not used VBA to try to retrieve HTML from a URL.
    Jeff
    | | |會 |會 |會 |會 | |:| | |會 |會
    Read the rules
    Use code tags to [code]enclose your code![/code]

  3. #3
    Registered User
    Join Date
    10-19-2011
    Location
    Charlestonm, SC
    MS-Off Ver
    Excel 2003
    Posts
    4

    Re: web query and yahoo finance stock quotes

    Thanks for the reply. I am using web query to import, from yahoo finance, yesterday's adjusted closing stock price (as a table). As you suggest, I link the particular cell to another worksheet, which updates every morning, calculates ytd return, and so forth. But I also have to reference older historical prices for 3, 5, and 10 year returns. I do this by importing the same table, in its entirety, via excel, and delete the web query portion. Because I am doing this for about 100 securities, I have a worksheet for each security. I was simply hoping that I could avoid the need to create multiple worksheets and simply import specific cells. Sounds like it is not possible.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Tags for this Thread

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