Google Multiple Search Terms

Scrape Google Search Results (Multiple Search Terms)

Goal:

Use Excel VBA to automate the task of (1) searching through MULTIPLE search terms and (2) retrieving the search results into an Excel worksheet

 

Example:

In this example, we have a list of the Forbes’s top 10 richest person/people. We will automate the task of searching each person on Google, and retrieving the page 1 search result onto our Excel worksheet.

Worksheet Prerequisites:

Input a list of search terms in column A starting from A1

Breakdown:

Open Internet Explorer

Browse to Google.com

Input search value from Excel (starting from the top of the list, cell A1) to the Google’s search bar

Click the “Google Search” button

For each search result, print the (1) Title and (2) Link into worksheet (starting at cell B1)

Close browser

Repeat for next row’s search value (A2, A3, A4, etc)

Result: