+ Reply to Thread
Results 1 to 6 of 6

clicking second search results from Google search

  1. #1
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Austria
    MS-Off Ver
    Excel 2007
    Posts
    457

    clicking second search results from Google search

    Hi all.

    Is it possible to select the second page of a google search?
    I found some code to open google and do a search, get results. But how about to go to the second page? I would like to go first to the first and then to the second.

    Hope some one can help out :-)

  2. #2
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: clicking second search results from Google search

    URL for "Page 2" of a google search looks something like:
    Please Login or Register  to view this content.
    Note the red text. Maybe you can tweak your existing code, to amend the URL you open?
    let Source = #table({"Question","Thread", "User"},{{"Answered","Mark Solved", "Add Reputation"}}) in Source

    If I give you Power Query (Get & Transform Data) code, and you don't know what to do with it, then CLICK HERE

    Walking the tightrope between genius and eejit...

  3. #3
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Austria
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: clicking second search results from Google search

    Hi Olly,

    I have the below code:
    Please Login or Register  to view this content.
    I guess I will need to stay on the same page and then use it again for second search, but no clue what would be the best to do it.

  4. #4
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Austria
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: clicking second search results from Google search

    Hi Olly,

    Your idea was good to use the red text at the end of the url.
    I started to build a similar line from the parts:

    "https://www.google.co.uk & "/" &search?q=" & rng1 (I did this from head as I forgot to copy it)
    I just could not add the last part of it to it: &start=10

    rng1 would give me the value I had in cell A2 (what I'm searching). Then adding the &start=10 at the end would give me always the second page. (&start=0 would give the first page)

    This way I could combine it and go to the first search page and then to the second search page.

    just to recap:
    https://www.google.co.uk/search?q=foo&start=10
    The text in red should come from rng1 (cell A2)

  5. #5
    Forum Expert Olly's Avatar
    Join Date
    09-10-2013
    Location
    Darlington, UK
    MS-Off Ver
    Excel 2016, 2019, 365
    Posts
    6,284

    Re: clicking second search results from Google search

    Try something like:
    Please Login or Register  to view this content.
    This writes a URL based on the search string contained in the specified range, with a 'page' value, then opens that URL in IE.

  6. #6
    Forum Contributor
    Join Date
    08-02-2012
    Location
    Austria
    MS-Off Ver
    Excel 2007
    Posts
    457

    Re: clicking second search results from Google search

    Hi Olly,

    Big thanks
    works really great. One more question. Is it possible to have it run without the need to actually open Internet Explorer and get the print to PDF dialog box? I guess that would be even faster.

    Greetings.

+ 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. Is there a way i can scrape google search results?
    By wittyjack in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 05-23-2014, 07:04 PM
  2. Linking Search Results from an existing search macro
    By mougiasm in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 01-16-2013, 04:15 PM
  3. Invalid call only when results are zero in Google search Excel.
    By Juul1234 in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 06-12-2012, 05:52 PM
  4. Excel Macro to Count Google Search Results
    By jeffreytp in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-07-2012, 02:37 PM
  5. Export Google search results to Excel
    By WEEZY760 in forum Excel General
    Replies: 2
    Last Post: 03-23-2012, 05:50 PM
  6. Web Query # of Google Search Results
    By muckfaster in forum Excel Programming / VBA / Macros
    Replies: 12
    Last Post: 03-15-2012, 11:27 AM
  7. Replies: 0
    Last Post: 11-05-2009, 04:47 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