+ Reply to Thread
Results 1 to 8 of 8

Macro to retrieve web data based on contents of a cell

  1. #1
    Registered User
    Join Date
    08-09-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Macro to retrieve web data based on contents of a cell

    Hi all,

    Longtime member, but first-time poster. Please forgive me if this is addressed elsewhere in the forum.

    I have a data set that contains approximately 500,000 rows of data related to properties in my county. Each row of data corresponds to a distinct property, and has a unique identifier (Parcel ID). What I'd like to do is create a macro that pulls information from the county website associated with each Parcel ID. The county website allows you to search by Parcel ID (http://www2.county.allegheny.pa.us/R...te/Search.aspx), so it's a matter of taking the Parcel ID in cell A1, A2, A3, etc., populating the form, searching, and pulling results from the next page.

    I've tried recording a macro but am running into some challenges. Does anybody have a recommendation for how I might be able to go about this?

    Thanks,
    Andy

  2. #2
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to retrieve web data based on contents of a cell

    pulls information from the county?
    What sort of information?
    Do you have Parcel ID for testing?
    It is difficult to say if it is possible with out seeing the pages.

  3. #3
    Registered User
    Join Date
    08-09-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Macro to retrieve web data based on contents of a cell

    Thanks for the quick response; I'll try to explain it a little differently.

    My county has a public database of property information that can be searched based on Parcel ID. The website is http://www2.county.allegheny.pa.us/R...te/Search.aspx.

    I have a list of every Parcel ID in the county in "Column A" of my workbook. I'd like to create a macro to take the Parcel ID in Column A, search for it in the public database at the URL listed above, then return the "Owner Name" from the resulting page into "Column B". I'd like to repeat this process for each Parcel ID.

    A sample Parcel ID for testing is: 0236A00100000A00

    Does this help to clarify?

    Thanks.

  4. #4
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to retrieve web data based on contents of a cell

    So, you just want to return

    Owner Name : REDEVELOPMENT AUTH OF ALLEGHENY COUNTY

    Right?
    half- million rows will take long time to process

  5. #5
    Forum Expert
    Join Date
    03-28-2012
    Location
    TBA
    MS-Off Ver
    Office 365
    Posts
    12,454

    Re: Macro to retrieve web data based on contents of a cell

    You seem to have disappeared with out answering my question.
    Please put all numbers from A2 down as shown on the attached and run the code.
    Please try it first on 100 rows.
    Attached Files Attached Files
    Last edited by AB33; 08-17-2016 at 05:43 PM.

  6. #6
    Valued Forum Contributor
    Join Date
    06-21-2013
    Location
    Bangladesh
    MS-Off Ver
    Excel 2000, Excel XP, Excel 2002, Excel 2007, Excel 2010, Excel 2013
    Posts
    975

    Re: Macro to retrieve web data based on contents of a cell

    I am not so good in data scrapping. But you can use this macro. But see the attachment to be confirmed.
    Please Login or Register  to view this content.
    Attached Files Attached Files

  7. #7
    Registered User
    Join Date
    08-09-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Macro to retrieve web data based on contents of a cell

    AB33 - Your macro worked well on a test data set of ~250 rows. I am going to try to run on the full dataset overnight and see what the result is. I will keep you posted.

  8. #8
    Registered User
    Join Date
    08-09-2013
    Location
    United States
    MS-Off Ver
    Excel 2010
    Posts
    4

    Re: Macro to retrieve web data based on contents of a cell

    AB33 - while my Excel crashed a couple times, this did end up doing the job. I had to chunk it out and run several smaller jobs. Thanks a lot for your help!

+ 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. [SOLVED] Retrieve Data From Cell Based in Array Based on LARGE Function
    By justarandomguy in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 10-13-2014, 02:31 AM
  2. [SOLVED] Use Cell contents to determine sheet name to retrieve a value from.
    By PeterR in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 04-08-2014, 09:18 PM
  3. [SOLVED] Retrieve data from a cell based on date criteria in another
    By ajob in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 02-23-2014, 08:49 AM
  4. Macro to move row based on cell contents
    By alpha608 in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 01-17-2013, 04:08 AM
  5. Macro that will clear contents of cell based on format of text in adjacent cell
    By judasdac in forum Excel Programming / VBA / Macros
    Replies: 4
    Last Post: 05-12-2012, 01:56 AM
  6. [SOLVED] Macro to find and retrieve cell contents
    By DancingElvisLives in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 08-31-2011, 09:33 AM
  7. Run macro based on cell contents
    By Billip in forum Excel Programming / VBA / Macros
    Replies: 3
    Last Post: 08-16-2011, 06:55 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