+ Reply to Thread
Results 1 to 6 of 6

Macro using outside applications (esp. search result using a web browser)

Hybrid View

  1. #1
    Registered User
    Join Date
    09-21-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Question Macro using outside applications (esp. search result using a web browser)

    I have a list of businesses, and I want to add their website into my spreadsheet. Rather than searching for each one individually, I was hoping I could set up a macro to do it for me. So, my spreadsheet looks something like this:

    A B C D E
    1 Business Name City State Google this concatenated phrase URL
    2 ABC123 Helicopters Los Angeles California ABC123 Helicopters in Los Angeles California
    3 Lizzard Food Store Chicago Illinois Lizzard Food Store in Chicago Illinois

    I want to basically have a macro search online (via google or bing) for the phrase in the D column and return the first search result's URL in the E column. Any thoughts?

  2. #2
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro using outside applications (esp. search result using a web browser)

    Doing that very thing would violate Google's Terms of Service. All searches must be manual.
    _________________
    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!)

  3. #3
    Registered User
    Join Date
    09-21-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Macro using outside applications (esp. search result using a web browser)

    What about another search engine (Bing, Duck Duck Go, Blekko etc)...?

  4. #4
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro using outside applications (esp. search result using a web browser)

    Yes, what about them? If you read the Terms of Service for any of them, I imagine you will find they all prohibit you from using their site in a "automated" way. Took me 30 seconds (Search: Bing Terms of Service) to find this:

    9. How You May Not Use the Program
    You must not at any time use the Program to harm others, or the Program. For example, you may not: 
    
    • engage in, facilitate or further unlawful conduct;
    • use the Program in a way that harms us or our advertisers, affiliates, resellers, distributors and/or vendors, or any customer of ours or our advertisers, affiliates, resellers, distributors and/or vendors;
    • use any automated process or service to access and/or use the Program (such as a BOT, a spider, periodic caching of information stored by Microsoft, or "meta-searching");
    • use any unauthorized means to modify or reroute, or attempt to modify or reroute, the Program;
    • damage, disable, overburden, or impair the Program (or the network(s) connected to the Program) or interfere with anyone's use and enjoyment of the Program; or
    • resell or redistribute the Program, or any part of the Program

  5. #5
    Registered User
    Join Date
    09-21-2012
    Location
    USA
    MS-Off Ver
    Excel 2010
    Posts
    11

    Re: Macro using outside applications (esp. search result using a web browser)

    Awww, nuts.

    Well, theoretically, is it possible to do something like that using excel? Use another application/program within a macro?

  6. #6
    Forum Expert JBeaucaire's Avatar
    Join Date
    03-21-2004
    Location
    Bakersfield, CA
    MS-Off Ver
    2010, 2016, Office 365
    Posts
    33,492

    Re: Macro using outside applications (esp. search result using a web browser)

    Yes it is possible. You will need to learn, on your own, how to:

    1) Learn how to use the WEB QUERY tools built into Excel
    2) Determine if the resulting page has the URL you want in a spot you can find consistently on the web page
    3) Create a looping macro that will take one string at a time from your column and put into a web query, then pull the URL you know how to find (step 2) back into your original sheet, then repeat with the next string.


    I do not think the URLs will be found in an easy way on the resulting pages as search results seldom are that consistent.

+ 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