+ Reply to Thread
Results 1 to 6 of 6

Pulling certain info from Yahoo Finance without ticker symbols

  1. #1
    Registered User
    Join Date
    01-07-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    6

    Pulling certain info from Yahoo Finance without ticker symbols

    Hi all,

    I need some help with a project. Essentially, I need to pull the "Sector" and "Industry" of certain companies from yahoo finance to see how they are classified. Issue is, I have around 1,000 companies to do this for.

    I am looking to build a macro that will take the company name in col B, and pull it's sector and industry and plant them into rows E and F. It then needs to repeat the process until it hits the bottom of the list. When the macro hits the first blank cell in column B, it should stop. Row 8 is my first row.

    Is this even possible? The thought of doing this by hand (like a caveman) is enough to make me cringe. I can only make recorded macros, but after encountering a situation like this, i see a need to learn the real way.

  2. #2
    Forum Moderator Leith Ross's Avatar
    Join Date
    01-15-2005
    Location
    San Francisco, Ca
    MS-Off Ver
    2000, 2003, & 2010
    Posts
    23,258
    Hello wolfy,

    Welcome to the Forum!

    If you want to retrieve information from a website, you need to provide that information (URL of the page you want). Some finance sites are accessible only if you are a member. Please let us know if this is a member only site.

    Sincerely,
    Leith Ross

  3. #3
    Registered User
    Join Date
    01-07-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    6
    It is a free site: finance.yahoo.com

    For example, if the company I am looking for was Google, i would need the macro to go here: http://finance.yahoo.com/q/pr?s=GOOG which is the profile of the company, I would then need it to pull information from the "details" box. Specifically:

    The "Sector", in this case, Technology, would need to go into column E.

    The Industry, in this case, Internet Service Providors, would need to go into column F

    to search for a company the macro must search the company name, "Google", and paste it into the "get quotes", then go to the "profile page".

    If a ticker symbol is absolutely necessary, as to simply create a macro that plugs in the symbol at the end of the link shown above, I can possibly retrieve the tickers for each company.

    Let me know and thanks a lot for the welcome!

  4. #4
    Registered User
    Join Date
    01-07-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    6
    Hi all - i have an easier request now. I recorded a macro that does basically what i want, but i need it to now loop itself until i hit the bottom of my list. Here's the macro: If there is an error, i would prefer it to just output "ERROR" or something to that effect just so i can esily identify them, but then continue down the list, but it's not necessary.

    I have a feeling there's some not-needed stuff in there. I don't want it to always go to http://finance.yahoo.com/q/pr?s=goog obviously, but whatever link is in column D.

    Please Login or Register  to view this content.

  5. #5
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492
    Any reason you're not just using a Data > Import External Data > New Web Query? That's what this is designed for....

    Surf out and find the little yellow arrow on the dataset you want, click on that yellow arrow, click Import, New Worksheet, Properties, Refresh Every X minutes, OK.

    Now this data is on a scrap sheet, you can use simple =NewSheet!A1 formulas to grab the data pieces you want and lay it out on your main pages as desired.

    Use that sheet to collect all your web queries, then just hide the sheet to keep it out of sight.
    _________________
    Microsoft MVP 2010 - Excel
    Visit: Jerry Beaucaire's Excel Files & Macros

    If you've been given good help, use the icon below to give reputation feedback, it is appreciated.
    Always put your code between code tags. [CODE] your code here [/CODE]

    ?None of us is as good as all of us? - Ray Kroc
    ?Actually, I *am* a rocket scientist.? - JB (little ones count!)

  6. #6
    Registered User
    Join Date
    01-07-2009
    Location
    USA
    MS-Off Ver
    Excel 2003
    Posts
    6
    Ok, so this is my new Macro. All i need is for it to now loop. I used what you said, but I will now need it to run down the list until the list ends.

    Please Login or Register  to view this content.

+ 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