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
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