Consulting

Results 1 to 13 of 13

Thread: Excel VBA macros - webquery

  1. #1

    Excel VBA macros - webquery

    Hi,
    Please help me with VBA code for:
    I need to get latitude/longitude positions for some addresses in US.
    I have ADDRESS with ZIP as single input from a cell (A1) in Excel. Now macro has to put that cell value into Website (say google.com)
    and populate the output and copy the value back in Excel in
    next column same row (B1 cell).
    This web query needs to be performed for 1000 number of addresses (A1 to A1000 cells) which are put in a column in excel.
    please help me with the code.
    Thanks,
    Ramesh

  2. #2
    can anyone answer to this question ??

  3. #3
    Hi nagaramesh,
    Are you still looking for this solution??
    I've very recently started to look at VBA and IE integration. I believe your task can be done, let me know if you still require help with it.

  4. #4

    Post I'm still luking for answer

    Hi Ashley,

    I'm still in search for answer as VBA is lill difficult for me to understand


    Quote Originally Posted by ashleyuk1984 View Post
    Hi nagaramesh,
    Are you still looking for this solution??
    I've very recently started to look at VBA and IE integration. I believe your task can be done, let me know if you still require help with it.

  5. #5
    I know what you mean :P I'm still learning it myself.
    Could you please provide me with a workbook with a few addresses, so I can see the format that they are in. Also, do you have any particular website that you would like me to use in order to obtain the latitude/longitude positions.

  6. #6
    you can take this web : findlatitudeandlongitude.com/batch-geocode

    data looks like this:
    PROPSTREET PROPZIP PROPSTRNBR PROPCITY CNTYCDE STATE
    Hwy 630 E 33843 5500 Frostproof POLK FL

  7. #7
    Hi nagaramesh.
    I have coded up the web query. It seems to be working fine.
    Unfortunately I couldn't use the website that you suggested, it handles html in a funny way and I wasn't able to extract the data required for some reason.
    However, I have found another website which is very similar which I can extract the data from.
    Due to the type of query that we are running here, each line takes a second or so to return the correct data, so if you have 1000 lines, then you'll be looking at around 15 - 20 minutes for all the data to complete. Which is pretty good considering it's automated, and no longer manual.

    Please could you provide me with some more addresses, in the same format as above so that I can test a bit more before handing you the file & code.
    5 more addresses will be OK, I can copy and paste them multiple times. I just need to make sure that the code is handling the query correctly.
    Thanks

  8. #8
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  9. #9
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    and there is a database available here in csv format:

    http://federalgovernmentzipcodes.us/
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  10. #10
    Do you have more addresses ???

  11. #11
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    i dont have any

    that site is a result of google search...
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

  12. #12
    Sorry mancubus, I was talking to the op I want more addresses so that I can test my vba coding further, before I hand him/her the final product.

  13. #13
    VBAX Guru mancubus's Avatar
    Joined
    Dec 2010
    Location
    "Where I lay my head is home" :D
    Posts
    2,644
    sorry too, ashleyuk1984.


    i thought you were the OP...

    i must be tired...
    PLS DO NOT PM; OPEN A THREAD INSTEAD!!!

    1) Posting Code
    [CODE]PasteYourCodeHere[/CODE]
    (or paste your code, select it, click # button)

    2) Uploading File(s)
    Go Advanced / Attachments - Manage Attachments / Add Files / Select Files / Select the file(s) (multiple files can be selected while holding Ctrl key) / Upload Files / Done
    Replace company specific / sensitive / confidential data. Include so many rows and sheets etc in the uploaded workbook to enable the helpers visualize the data and table structure. Helpers do not need the entire workbook.

    3) Testing the Codes
    always back up your files before testing the codes.

    4) Marking the Thread as Solved
    from Thread Tools (on the top right corner, above the first message)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •