+ Reply to Thread
Results 1 to 4 of 4

VBA to search internet and copy data into sheet based on search

  1. #1
    Forum Contributor
    Join Date
    06-24-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2016
    Posts
    124

    VBA to search internet and copy data into sheet based on search

    Hi all

    I have a particularly tricky / interesting request.

    I am trying to work out a way to create a VB script that will search the internet for data and copy matching results back to the sheet in a row per data search.


    Here’s an example:

    I type a name into Userform textbox and click search....
    The textbox contents is copied (maybe using send keys method)
    A webpage is opened at Google home page and the textbox contents are pasted in search field and the send key scrip to start Google search.
    As results are displayed in Google, any results that match the textbox value are copied as rows to a sheet in excel.
    This process needs to loop until completed (unsure how to determine when a search is complete)

    Reason:

    There are two reasons I want to do this...
    1) I am attempting to create a Gaming Clan database that will have an up-to-date list of members.
    2) I want to be able to search and add to the database adhoc or on a timed schedule (for the adding part)

    Maybe VBA is not the best way to do this (I don’t know what is) but I hope there is very talented person that can help me or lead me to the right direction.

    Many thanks to all that read this!

  2. #2
    Registered User
    Join Date
    09-06-2011
    Location
    Paris
    MS-Off Ver
    Excel 2003
    Posts
    23

    Re: VBA to search internet and copy data into sheet based on search

    This is called scraping. It's a big subject.

    Here's one of many starter tutorials: http://analystcave.com/web-scraping-tutorial/.

    You might find that a browser extension or utility might work more easily than VBS. see here for example: http://www.garethjames.net/a-guide-t...rapping-tools/
    Last edited by 1819; 01-29-2016 at 07:11 PM. Reason: adding url

  3. #3
    Forum Contributor
    Join Date
    06-24-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2016
    Posts
    124

    Re: VBA to search internet and copy data into sheet based on search

    Thank you for this direction.
    It has saved me a lot of hassle and time.

  4. #4
    Forum Contributor
    Join Date
    06-24-2013
    Location
    New Zealand
    MS-Off Ver
    Excel 2016
    Posts
    124

    Re: VBA to search internet and copy data into sheet based on search

    Marking as solved as have used a Chrome extension called Websrapper, It is really great! Basic, but does the job

+ 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. Keyword search and copy row to new sheet: search term problem
    By completenovice in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 11-20-2014, 11:32 AM
  2. Replies: 3
    Last Post: 07-10-2013, 01:39 PM
  3. [SOLVED] Search for heading in data sheet and copy range to corresponding sheet in master workbook
    By sans in forum Excel Programming / VBA / Macros
    Replies: 11
    Last Post: 07-07-2012, 10:02 AM
  4. Need Macro to search from mater sheet and copy in another sheet based on Criteria
    By humacdeep in forum Excel Programming / VBA / Macros
    Replies: 22
    Last Post: 02-29-2012, 01:03 PM
  5. Copy data between sheets based on search criteria
    By Phosphonothioic in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 02-21-2011, 11:51 AM
  6. Macro to search the sheet name and copy and paste the data from a major sheet
    By salma2009 in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-04-2009, 02:11 AM
  7. Search for rows in one sheet and copy into another sheet based on customer id
    By excel_chi in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-20-2007, 04:18 AM

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