+ Reply to Thread
Results 1 to 6 of 6

Populate a cell with URL retrieved from Google?

  1. #1
    Registered User
    Join Date
    07-15-2008
    Location
    Home
    Posts
    2

    Populate a cell with URL retrieved from Google?

    Apologies if this is a far-fetched scheme, but I have a spreadsheet of a couple thousand company names and addresses and would like to also add the URL for each company.

    In my quick and dirty tests, when I Googled the company names (from column A), the first search result was accurate (ie; Company name "Acme Widgets" yields www.acmewidgets.com) about 70% of the time.

    Is it possible to create a script/macro/other that will run a Google "I'm feeling lucky" search using the company name from cell A1 and return this URL and populate it in C1?

    Is what I'm thinking of possible within Excel?

    If it matters, I'm on a Mac running Excel X 2001 (with VBA) - but could probably track someone down who runs a current Windows version of Excel if need be.

    Thanks for listening.
    Cam

  2. #2
    Forum Contributor
    Join Date
    10-01-2007
    Posts
    101
    are you looking for the web site of each corporation or are you trying to download data about the company from a central server like google?

  3. #3
    Forum Contributor
    Join Date
    07-01-2008
    Location
    Cincinnati, OH
    Posts
    150
    In sticking with your quick and dirty theme...
    Never the less, the results were fairly accurate. Unfortunately, I do not have a MAC. This code utilizes the internet explorer webbrowser control. Is this installed with office for MAC? I don't know...

    Is fairly slow but would be good enough for me for an occasional run... Saves the workbook at every 50th row.

    Download the example or follow the instructions below. There is a list of companies in in column a that I tested this on. Disable script debugging. See comments in code...

    Download Example Workbook

    Add UserForm1 with WebBrowser1.
    There is no code in the userform.

    Select your URL list and name it UrlList.
    Add this code in a public class module. Any worksheet or the workbook class will do.
    Please Login or Register  to view this content.
    Last edited by Tom Schreiner; 07-16-2008 at 01:28 AM.

  4. #4
    Forum Contributor
    Join Date
    10-01-2007
    Posts
    101
    tom--

    im trying to run your code but the complier is telling me that
    Please Login or Register  to view this content.
    needs to be in the object module. I pasted it in the module for sheet1 and still got the error. i believe i turned off all debugging? where did i go wrong?

  5. #5
    Forum Contributor
    Join Date
    07-01-2008
    Location
    Cincinnati, OH
    Posts
    150
    Did you download the example and recieve the same error?

  6. #6
    Registered User
    Join Date
    07-15-2008
    Location
    Home
    Posts
    2
    Wow - thanks, Tom. I don't have IE installed on my Mac, but I'll try this on a PC and let you know the result!

+ 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