+ Reply to Thread
Results 1 to 8 of 8

Batch stock info lookup in Excel 2003

Hybrid View

  1. #1
    Registered User
    Join Date
    11-07-2006
    Posts
    4

    Batch stock info lookup in Excel 2003

    I've been using Excel for years now to help me track information on stocks. However, I have 30 stocks or so that I normally look-up on the Internet, then enter the data into Excel. It takes me around 1.5 hours each week to update all these numbers. I figure there HAS to be an easier way to do this.

    My sheet looks something like this:

    Stock____1yr Rank____3yr Rank____1yr Return____3yr Return
    ACEGX____84__________86__________0.67__________4.03

    What I want to be able to do is have the Stock Symbol in a certain column, and return the other information from the Internet. I use smartmoney.com for looking up the info currently. BTW, the Rank is "% Rank in Class".

    Is this even possible? I've only seen people get Stock Prices, and that comes from only from one source. Am I doomed to take 1.5 hours each week updating info that Excel should be able to perform for me in less than 30 seconds?

    Any help would be GREATLY appreciated.

    JonB
    Last edited by JonB; 11-07-2006 at 02:10 AM.

  2. #2
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi,

    What about getting yahoo quotes with following code
    Sub GetYQuotes()
       Base01 = "http://finance.yahoo.com/d/quotes.csv?s="
       Base02 = "&f=sl1d1t1c1ohgv&e=.csv"
       sURL = ""
       SymString = ""
       
       LastRow = Cells(65536, 1).End(xlUp).Row
       
       For i = 1 To LastRow
           SymString = SymString & Cells(i, 1) & " "
       Next i
       sURL = Base01 & SymString & Base02
       Workbooks.Open sURL
       Set rngSource = Cells(1).CurrentRegion
       x = rngSource.Rows.Count
       y = rngSource.Columns.Count
       With ThisWorkbook.Sheets(1)
           Set rngDest = Range(.Cells(1, 1), .Cells(x, y))
       End With
       rngDest.Value = rngSource.Value
       ActiveWorkbook.Close SaveChanges:=False
    End Sub
    HTH
    Carim

  3. #3
    Registered User
    Join Date
    11-07-2006
    Posts
    4
    Thank you! I had NO IDEA that Yahoo Finance had the Rank in Class. I'll give it a try!

    Thanks again!

    JonB

  4. #4
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    You are more than welcome ...

    Have Fun ... and Profits ... !!!

    Carim

  5. #5
    Registered User
    Join Date
    11-07-2006
    Posts
    4
    Um, ok. Now my noob status is showing.

    Where do I get this Yahoo Quotes stuff? Is it an add-in for Excel? And where do I put this code? And, lastly, is there a tutorial on using it?

    I've used Excel to do LOTS of calculations before, but NEVER something like this.

    Thanks for all your help!

    JonB

  6. #6
    Forum Expert Carim's Avatar
    Join Date
    04-07-2006
    Posts
    4,070
    Hi JonB,

    A couple of remarks ...
    1. This is not an add-in, it is a simple macro to be saved in a standard module
    2. It retrieves prices and volume info, as lon as stock symbols are located in column A
    3. It does not bring back rankings ... this calculation would have to done at the worksheet level ...

    HTH
    Cheers
    Carim

+ 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