+ Reply to Thread
Results 1 to 8 of 8

Looking for code to search web based on value and return phone number

  1. #1
    Registered User
    Join Date
    08-18-2015
    Location
    Boston, MA
    MS-Off Ver
    2010
    Posts
    3

    Looking for code to search web based on value and return phone number

    Hi,
    I was wondering if there is a way to write a VBA code that will take a value from a cell (a name) and search the web to find a phone number. I would want the phone number to be pasted into another cell. I've searched the web but haven't been able to make any of the results work. I have a specific website in mind but in order to get to the phone number page there are multiple clicks required taking me a few pages deep - three to be exact. Any guidance is appreciated!
    Thanks,
    Jeremy

  2. #2
    Registered User
    Join Date
    07-15-2015
    Location
    South East England
    MS-Off Ver
    2010 & 2013
    Posts
    72

    Re: Looking for code to search web based on value and return phone number

    Hi Jeremy,

    Does the website in question have the Name as part of the URL once you have navigated three pages?

    e.g. www.website.com/search/john-smith/phonenumber
    Happy to help, if I did please Add Reputation

  3. #3
    Registered User
    Join Date
    08-18-2015
    Location
    Boston, MA
    MS-Off Ver
    2010
    Posts
    3

    Re: Looking for code to search web based on value and return phone number

    Joe,
    It has the string .../physicians/dr-firstname-lastname-uniqueID. The first page is has a search bar that I can enter the name (or paste it from my cell) and then the state I want to search. The second page comes up with the list of results for that. The third page (if I click on the proper name) brings me to the page where I can now get the phone number.
    Does this help? Thanks in advance for the guidance...
    Jeremy

  4. #4
    Registered User
    Join Date
    07-15-2015
    Location
    South East England
    MS-Off Ver
    2010 & 2013
    Posts
    72

    Re: Looking for code to search web based on value and return phone number

    Do you have the Prefix, First Name, Last Name & UniqueID already?

    And could you attach a screen shot of the webpage please?

  5. #5
    Registered User
    Join Date
    08-18-2015
    Location
    Boston, MA
    MS-Off Ver
    2010
    Posts
    3

    Re: Looking for code to search web based on value and return phone number

    Joe,

    Thanks. I do not know the unique identifier in advance. Here is what you asked for...

    First screen shot at home page. Web address bar contents = http://www.healthgrades.com

    image.jpg

    First search results page screen shot (normally the search yields only one result though). Web bar contents = http://www.healthgrades.com/provider...SolrCity=false

    image.jpg

    Final page where phone number is found screen shot. Web address bar contents = http://www.healthgrades.com/provider/john-smith-2y6rf

    image.jpg

    Thanks,
    Jeremy

  6. #6
    Registered User
    Join Date
    08-19-2015
    Location
    Atlanta, GA
    MS-Off Ver
    2010
    Posts
    2

    Re: Looking for code to search web based on value and return phone number

    Has anything happened with this? I'm looking for something very similar, but can take address information from 3 cells (street address, city, zip code) and then can give me back the Zillow and Trulia links for those addresses.

  7. #7
    Registered User
    Join Date
    07-15-2015
    Location
    South East England
    MS-Off Ver
    2010 & 2013
    Posts
    72

    Re: Looking for code to search web based on value and return phone number

    Hi Jeremy,

    Without knowing the UniqueID I cannot think of a way to automate this.

    The approach that I had in mind was to construct a URL from the name and run a Web Query on it, and scrape the phone number.

    There are various Web Scrapping software options out there (which you may want to try) but I have never used any of them.

    If you end up compiling the list manually, take a note of the URL. If you have a list of URLs then updating the list in the future will be more straight forward.

    Sorry I couldn't be of more help
    Joe

  8. #8
    Registered User
    Join Date
    08-19-2015
    Location
    Atlanta, GA
    MS-Off Ver
    2010
    Posts
    2

    Re: Looking for code to search web based on value and return phone number

    DataToolbar is a good web scraping tool that I use. The free version has full functionality, but you'll only be able to save the first 100 search results.

+ 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. Web Query Macro return phone number and website based on data recieved
    By sclog in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 01-23-2015, 06:10 PM
  2. I need a VBS code that change a phone number to the name of the owner
    By zitno in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 09-08-2014, 04:47 PM
  3. [SOLVED] Search for phone number list in multiple cells and display an alert.
    By venkatakrishna in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 02-03-2014, 11:18 AM
  4. HELP, changing phone number periods to hypens vba code
    By dlsmith36 in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 07-01-2013, 11:18 AM
  5. Replies: 0
    Last Post: 06-04-2013, 09:01 PM
  6. Search for corresponding mobile phone number using email address
    By davisraye in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 06-21-2012, 10:52 AM
  7. How do I add parenthesis to my phone number list -the area code?
    By Alan in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 05-10-2006, 01:00 PM

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