• Hi All

    Please note that at the Chandoo.org Forums there is Zero Tolerance to Spam

    Post Spam and you Will Be Deleted as a User

    Hui...

  • When starting a new post, to receive a quicker and more targeted answer, Please include a sample file in the initial post.

Copy website content in to excel (Search result)

Hi, greenculture!

As a new user you might want (I'd say should and must) read this:
http://chandoo.org/forum/forums/new-users-please-start-here.14/

And regarding your issue, if you use the built-in search at the top right with the proper keywords (web query, or something alike), you'd get all the topics regarding data extraction from the web. I now remember one of a week ago:
http://chandoo.org/forum/threads/simple-database-build.13673/#post-80859
From there you can extract ideas and procedures to adapt it to your requirements.

Also give a look at the uploaded file. I've recorded a macro from retrieving Name=John and leaving the information (just 1st 200) in worksheet Hoja1. This is the code:
Code:
Option Explicit

Sub Macro1()
'
' Macro1 Macro
'

'
    With ActiveSheet.QueryTables.Add(Connection:= _
        "URL;http://portal.maccem.com.au:8080/cgi-bin/portalnew.sh/portal/namesenq.p?surname=&firstname=John&othernames=&knownas=&yearfrom=&yearto=&postfunc=Search&companyid=3&scrollx=0&scrolly=0" _
        , Destination:=Range("$A$1"))
        .Name = _
        "namesenq.p?surname=&firstname=John&othernames=&knownas=&yearfrom=&yearto=&postfunc=Search&companyid=3&scrollx=0&scrolly=0"
        .FieldNames = True
        .RowNumbers = False
        .FillAdjacentFormulas = False
        .PreserveFormatting = True
        .RefreshOnFileOpen = False
        .BackgroundQuery = True
        .RefreshStyle = xlOverwriteCells
        .SavePassword = False
        .SaveData = True
        .AdjustColumnWidth = True
        .RefreshPeriod = 0
        .WebSelectionType = xlSpecifiedTables
        .WebFormatting = xlWebFormattingNone
        .WebTables = """deceasedlist"""
        .WebPreFormattedTextToColumns = True
        .WebConsecutiveDelimitersAsOne = True
        .WebSingleBlockTextImport = False
        .WebDisableDateRecognition = False
        .WebDisableRedirections = False
        .Refresh BackgroundQuery:=False
    End With
End Sub

As you might see, the clue here is to segment any or the arguments (Surname, Firstname, etc.) using filter criteria that don't produce more than 200 outputs, data will be retrieved in worksheet Hoja1, and you should copy it -for example- in another worksheet at the end of the existing data. As I don't know how many records are we talking about I can't recommend you to do it neither manually nor automatically.

For this last case, I'd build a list of all the possible names, a list of all the known or probable surnames, a list for each field in the selection form, and then run the procedure replacing the proper criteria used. Then when retrieving less than 200, I'd mark it as Ok, otherwise as to a criteria to be refined (expand the list).

Not an easy job, not for people with basic VBA skills (I don't know yours, in particular), but the toughest part is still building the proper criteria list. Don't care if you overlap criterias (Surname=Smith, and Firstname=John), at the end you can remove duplicates.

Hope it helps.

Regards!

EDITED

PS: Give a look at this too:
http://chandoo.org/forum/posts/76179/
 
Last edited:
i want to search surname only in alphabet order dictionary order.. can you make sum changes in surname feild i have multiple value.. i want to get all the entries 250000 rows
 
Back
Top