+ Reply to Thread
Results 1 to 16 of 16

Find Ticker Symbols with name

  1. #1
    Registered User
    Join Date
    06-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    13

    Find Ticker Symbols with name

    Hi folks.
    I was wondering if anyone had a vba that could essentially take a company name and look it up via yahoo finance to find its ticker symbol.
    This would make life so much easier for me since I have to go through about 400 companies on a regular basis this way.
    Thank you.

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Find Ticker Symbols with name

    Please attach a sample excel sheet with few company names in column A and their required symbol's in Column B.

  3. #3
    Registered User
    Join Date
    06-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Find Ticker Symbols with name

    Hi AB33.
    Here's just a sample list with a few tickers added in
    Thank you.
    Attached Files Attached Files
    Last edited by mistereun; 12-29-2016 at 10:42 AM.

  4. #4
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Find Ticker Symbols with name

    Quote Originally Posted by mistereun View Post
    take a company name and look it up via yahoo finance to find its ticker symbol
    Hi !

    You can easily request directly a search engine like DuckDuckGo or even Google to find any ticker with VBA …

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Find Ticker Symbols with name

    Hi Mistereun,
    I thought it would be easy to get the ticker from a company name, but it turns out to be much trickier than the tick symbol itself.
    While in theory there are many financial sites from which you can extract the symbol, all of them require exact spelling of companies’ name.
    Yahoo finance is the best bet, but this also requires an API. I have been trying to get an API from Yahoo, but it appears the service has discontinued.
    Even Google search has not given me all the symbols I requested. For instance , if I goggle "American International Group Inc.", I do not get the required page on the right hand side of Google's home page. However, If search “JPMorgan Chase & Co.”, I get the finance page on the right hand side. I managed to get most of the symbols from Google search. This is the same story with Yahoo search. The other down side of Google's search is I cannot get the right hand side pages using HTTP object and left with scrapping the symbols with slow Internet explorer which is not the preferred tool.

    I will do more research and get back to you with an update. In the meantime, if you know a site which we can use to get the data, let me know.
    Last edited by AB33; 12-30-2016 at 05:33 AM.

  6. #6
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Find Ticker Symbols with name


    Under DuckDuckGo as well Google I found AIG for « American International Group Inc. » in first two engine answers …

    With a research OP can found a site with a list of almost all tickers within an excel workbook downloadable !

  7. #7
    Registered User
    Join Date
    06-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Find Ticker Symbols with name

    Hi AB33,

    I appreciate your efforts with this task.
    I'm not sure how useful this answer might be, but I work primarily with banks, so my usual go to site is SNL.com
    As for accuracy/completion, I don't need a 100% of everything.
    If even 70% pop up it would save me days of work!
    Thank you.

  8. #8
    Registered User
    Join Date
    06-10-2013
    Location
    United States
    MS-Off Ver
    Excel 2016
    Posts
    13

    Re: Find Ticker Symbols with name

    Hi Marc,

    To be honest, I'm very unfamiliar with VBA's still so I'm not quite sure what to do.
    If you have the time, please let me know what you meant with your latest post.
    Thank you.

  9. #9
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Find Ticker Symbols with name

    Hi Mistereun,
    See attached.
    I have 2 codes-one from Google in Column B and Wiki in column C. As you can see, some of the results are weird.
    None of the codes are reliable, but that is what you get if the company name is not exact.
    I run the codes a week ago, but when I try to run them again, I am warned by Google of detecting heavy traffic from IP address which is weird as I have never seen this warning before. I am told to use a Coptcha in order to make a search.

    Hi Marc,
    It does not help any one if I you just a post a single line of comment. You do not need or have to refer to my code. If you feel my code is wrong, please help the OP by providing a solution, not a comment. If you came up with solution, I also do not need to waste any time. Our aim is to provide a working code, after all.
    Attached Files Attached Files

  10. #10
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Find Ticker Symbols with name

    Hi !

    I wasn't saying your code is wrong but as you are a Forum Guru I just aimed I saw ticker code in first answers of search engines …

    The Google warning message is common when using requests, could be bypass using IE or another search engine.

    To OP : allmost all tickers are listed within a free downloadable Excel workbook on a website, just perform a web search !


  11. #11
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Find Ticker Symbols with name

    Hi Marc,
    What is typing a word in Google search has got to do with being a "Guru"? Any one who can use a keyboard can do a simple search. It does not require any skill. A Guru also does not mean anything to me anyway.
    You either did not understand the OP's request or you do not want to write your own code. Instead of referring to my reply, you should refer to OP's request and give the OP a code. As I said, it does not help anyone by just throwing a single sentence. If you can see the Ticker in the first two lines in Google, give us the code then.

    FYI: If you Google, Marc, you have hundred's of results, but it will require lots of coding to get the Ticker for Marc as it could be found any where or no where. Do I have to go to each result and find the Ticker symbol or narrow down my choice?
    As I said to the OP, there are many sites which have these data, but all of them require exact name match.
    Last edited by AB33; 01-06-2017 at 04:26 AM.

  12. #12
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Find Ticker Symbols with name


    I did not start a code for two reasons : you was on this subject and all tickers are already listed in a downloadable workbook,
    an easy websearch for OP (as a child could achieve it) as it is easier for a VBA beginner to search within a workbook …

    You wrote « some of the results are weird » : can you give me a couple of names to see if easy websearches work for them …

    For example for "Berkshire Hathaway Inc. Class B" I found BRK-B, for "American International Group Inc." AIG,
    CB for "Chubb Ltd.", BBT for "BB&T Corp.", MMC for "Marsh & McLennan Cos. Inc.", TRV for "Travelers Cos. Inc.", …
    whatever the search engine (DuckDuckGo as well Google), not difficult to extract ticker from result link …

    If one of my previous results is wrong, OP has the choice to use the downloadable workbook.

  13. #13
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Find Ticker Symbols with name

    You still have not got it and it seems we are going around the circle.
    Whether or not I reply to a thread is irrelevant to you. My reply was to the OP and should do likewise as well. You should come up with your own code with out referring to other people's code-simply stick to your own code.

  14. #14
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Re: Find Ticker Symbols with name


    At least I wanna know if my sample results are good or not !

    Without any answer from OP, I won't waste time anymore …

  15. #15
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow Accuracy …

    Quote Originally Posted by AB33 View Post
    Any one who can use a keyboard can do a simple search.
    FYI: If you Google you have hundred's of results but it will require lots of coding to get the Ticker
    Yes, it is an easy search, the same to perform by code but no needs a lot of coding ! (Around 30 codelines …)

    Trick : try several websearch engines to choose the more accurate (avoid Google) or easier to extract …

    FYI : it is just a question of accuracy of the websearch as well of extracting ticker from right result.
    As from beginning of this thread the purpose is to search a ticker from company name on Yahoo Finance,
    the websearch must do the same : Yahoo Finance CompanyName …
    Check if a specific characters string for a ticker is whithin link and on Yahoo Finance then it's easy to extract ticker
    as you can see in this demonstration upon OP sample with a near 100% result without any missing ticker !

    I just mod a classic IE code I posted on another forum (like many samples within threads of this forum).
    It just needs to well observe how works search engine and what to extract from results,
    not difficult by warming a couple of neurones !

    So with an accurate websearch, the right answer is always in the beginning of results :
    from OP sample file, all missing tickers were found via first result except one with the second result !

    Another reason I did not post a try is from the poor 3 tickers results within the OP sample workbook
    I do not reach the same ticker result for one company, maybe OP made a typo ?
    Waiting for news from OP …

  16. #16
    Forum Expert
    Join Date
    11-24-2013
    Location
    Paris, France
    MS-Off Ver
    Excel 2003 / 2010
    Posts
    9,831

    Arrow


    Post #15 demonstration updated : column C displays link number if ticker not found within first link …

    Edit : new update within previous demonstration :

    after the IE version a more efficient web request is launched finding all missing tickers within first results !
    Last edited by Marc L; 01-09-2017 at 11:12 AM.

+ Reply to Thread

Thread Information

Users Browsing this Thread

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

Similar Threads

  1. [SOLVED] Extract Ticker Symbols (all capitals) from Text String
    By hoyasaxa215 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 10-07-2015, 11:02 AM
  2. Macro to Run through list of stock ticker symbols
    By johnk13 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 07-15-2014, 08:48 PM
  3. Replies: 2
    Last Post: 11-09-2012, 11:25 AM
  4. Replace old ticker symbols
    By worswick25 in forum Excel - New Users/Basics
    Replies: 8
    Last Post: 09-14-2011, 01:29 PM
  5. Pulling certain info from Yahoo Finance without ticker symbols
    By wolfy in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 01-08-2009, 11:37 AM
  6. the # of data records that correspond to the ticker symbols
    By excelbear in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 12-16-2007, 06:36 PM
  7. [SOLVED] Recognize more stock ticker symbols?
    By Bob in forum Excel General
    Replies: 2
    Last Post: 01-26-2005, 03:06 AM

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