+ Reply to Thread
Results 1 to 4 of 4

Simplest way to save the Quantity of Google searches found into Excel

  1. #1
    Registered User
    Join Date
    05-28-2021
    Location
    Christchurch
    MS-Off Ver
    Windows10
    Posts
    2

    Question Simplest way to save the Quantity of Google searches found into Excel

    Hello from a chilly wet New Zealand,

    I'm new to this forum and am asking for some advice to point me in the right direction.
    I'm not a programmer but I've been learning some VBA programing skills over the years by trial/error and researching the web.
    Normally I can find partial VBA solutions, tweak them and glue them together to do what I need but I'm struggling with the latest challenge which is my first time trying to scrape data from a website into Excel.

    In Column A I have a list of Google exact search phrases, typically 200-500 items.
    I want to write VBA code that will automatically search through this list and return the number of results found into the adjacent column.
    For example, for Purple Elephants I manually enter the exact phrase "Purple Elephants" into Google and it returns the results page with a total number of results found being 91,600.

    I want it to look like this....
    Column A Column B
    Purple Elephants 91,600
    Blue Bananas 79,900

    I did find some code on the internet, see attached, that I edited to get it running on my PC but all results come back as 0.

    This is my first foray into trying to extract data from a browser so out of my depth in that respect.

    I'm on Windows10 64-bit, using Microsoft 365 and have Chrome and Edge browsers installed.

    After digging further I'm found references to Selenium for compatibility with Chrome.

    Do I have to go down the Selenium pathway or is there another way I can get what I want, maybe using a different browser but without Selenium?

    I'd appreciate hearing from you if you can point me in the right direction.

    Thanks.
    John

  2. #2
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Simplest way to save the Quantity of Google searches found into Excel

    Not sure if this is what you're looking for, but this change copies results to the worksheet...
    Please Login or Register  to view this content.

  3. #3
    Registered User
    Join Date
    05-28-2021
    Location
    Christchurch
    MS-Off Ver
    Windows10
    Posts
    2

    Re: Simplest way to save the Quantity of Google searches found into Excel

    Yes, this did copy results to the worksheet for me, thank you.

    I did a test using a small list of 15 items I'd manually checked previously.
    Some of the results matched my previous results and 80% of them were within 20% of previous results.
    However, 20% of them different by thousands of percent and the problem is I wouldn't know which 20% that is unless I had done a manual check previously which defeats that whole purpose.

    I tried a different list of search terms and ran the macro to see if I could get any insights into the differences.
    Unfortunately, the results from the macro are now all zeros, and it's the same when I put back in my original list of search terms.

    I don't understand how this can happen.

    Perhaps there is a Google limit on the number of searches it allows using scraping.
    I only ran the macro about 6 times before it hit this snag.

    Any thoughts why this could be?

    I

  4. #4
    Forum Expert dangelor's Avatar
    Join Date
    09-06-2011
    Location
    Indiana, USA
    MS-Off Ver
    365 Pro Plus
    Posts
    2,274

    Re: Simplest way to save the Quantity of Google searches found into Excel

    Not all that familiar with web scraping, but maybe you need to put a delay in the code. It might be reading the results before they are 'published'.

+ 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] Google sheets vba to download file and save it to google drive folder and use it's data
    By western in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 01-14-2021, 08:48 AM
  2. Hyperlink Using Google to Conduct Searches
    By GoingProPro in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 03-20-2018, 11:27 AM
  3. Using VBA for extracting data from specific Google Searches
    By cfc06 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 09-14-2016, 11:50 AM
  4. Is there a way to automate google searches into excel?
    By Marine27 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-29-2016, 04:18 PM
  5. Mulitple IF ISNUMBER SEARCH if both searches are found.
    By Dessesbo in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 01-21-2015, 07:31 PM
  6. Is there a way to automate google searches into excel?
    By bxc2739 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 07-25-2013, 02:31 AM
  7. Simple Macro Help: Google Search Names & Keywords found in Excel Spreadsheet
    By excelbeginnerVBA in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 07-17-2012, 04:18 PM

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