Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Copy and Paste Internet Data in Excel

Status
Not open for further replies.

DrMingle

Technical User
May 24, 2009
116
US
I need some help hammering this out.I have posted a comments section with a pseudocode towards the bottom. I am essentially trying to copy and past the research findings on an output sheet. The output could be identified as one of four categories:

1. First Name, Last Name, and address match against cell data
2. Last Name and address match against cell data
3. Address match against cell data
4. No match - NA


Code:
Sub WhitePagesReverseLookup()
    Set ie = CreateObject("InternetExplorer.application")
    ie.Visible = True
    ie.navigate ("[URL unfurl="true"]http://www.whitepages.com/reverse-lookup")[/URL]
    Do
        If ie.readyState = 4 Then
            ie.Visible = True
            Exit Do
        Else
            DoEvents
        End If
    Loop

     'USE VIEW SOURCE TO GET FORM ELEMENT IDS
    ie.Document.forms(1).all("rev_address").Value = Range("D1")
    ie.Document.forms(1).all("location").Value = Range("D2")
    ie.Document.forms(1).submit
    
    '###############Looking for Assistance with below pseudo code###########################
    'IF FIRST NAME OF WHITEPAGES SOURCE MATCHES(WORKSHEET "SPEED SEARCH" CELL D3), LAST NAME OF WHITEPAGES SOURCE (WORKSHEET "SPEED SEARCH" CELL D4), AND ADDRESS OF WHITE PAGES MATCH (WORKSHEET "SPEED SEARCH" CELL D1)
    'THEN COPY PHONE NUMBER FROM WHITEPAGES SOURCE AND PASTE "FIRST NAME, LAST NAME, AND ADDRESS MATCH -- PHONE: xxx") TO WORKSHEET "OUTPUT RESEARCH" CELL A17
    'ELSE IF LAST NAME OF WHITEPAGES SOURCE MATCHES (WORKSHEET "SPEED SEARCH" CELL D4)AND ADDRESS MATCH OF WHITE PAGES SOURCE MATCH(WORKSHEET "SPEED SEARCH" CELL D1)
    'THEN COPY PHONE NUMBER FROM WHITEPAGES SOURCE AND PASTE "LAST NAME AND ADDRESS MATCH -- PHONE: xxx") TO WORKSHEET "OUTPUT RESEARCH" CELL A17
    'ELSE IF ADDRESS OF WHITEPAGES SOURCE MATCHES (WORKSHEET "SPEED SEARCH" CELL D1)
    'THEN COPY PHONE NUMBER FROM WHITEPAGES SOURCE AND PASTE "ADDRESS MATCH -- PHONE: xxx" TO WORKSHEET "OUTPUT RESEARCH" CELL A17
    'ELSE NO MATCH EXCEL RANGE
    'THEN TYPE STATEMENT "NO MATCH -- PHONE: NA" TO WORKSHEET "OUTPUT RESEARCH" CELL A17
    'END IF
End Sub
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top