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

Help Please - Need Code, macro

koki

New Member
I have more than 5000 keywords in excel spreadsheet to be researched in maps.google.com, maps.google.com.sa, etc. I am using Excel 2007. In "Sheet1" the following need to be done:

1. Copy the text from a cell (say A2:) “Tirane, Albania”

2. Open maps.google.com in google chrome browser

3. Paste "Tirane, Albania" in the search box

4. From the result page copy the BLUE TEXT next to the balloon symbol "A"

5. Paste the text in cell say B2.

Can anyone help me on this please. It would be of great help.

Thanks

Koki
 
Hi Koki ,


What kind of a time frame are you looking at ? Do you want it yesterday , today , tomorrow , within a week .... ?


Narayan
 
Hi Narayan, Thanks for your reply. I need the code asap. Can you help me on this..........? Thanks. koki
 
Hi Koki ,


Sorry. If you need it ASAP , then I will not be able to do it , since I have not done such a task earlier. If your time frame were a week or so , then this is interesting enough that I could work on it.


Narayan
 
Hi, koki!


Give a look at this file:

https://dl.dropbox.com/u/60558749/Help%20Please%20-%20Need%20Code%2C%20macro%20%28for%20koki%20at%20chandoo.org%29.xlsm


Copy your locations info to column A of sheet Main, and then press cyan button.

Then look into column C for the data retrieved. Check if it's right, and if not, copy and paste manually 10 examples in column D and re-upload the downloaded file.


I'll be back this afternoon.


Regards!


PS: same as NARAYANK991, I've never done such a thing with Google Maps (yes with a lot of other sources).


PS2: I'm getting an error (not really an error, just a code execution interruption) that I couldn't avoid yet; in the meanwhile, press Continue.
 
Hi SirJB7, Thanks a lot for the code. I tried reloading the excel file several times and finally runs fine with the code.


I tried to change the URL to maps.google.com in VBA. It displays the entire page data after the red balloon symbol "A".


Then I continued with "Macro Code to split text on new line" with the retrieved data in a new excel file. I got this "Macro Code to split text on new line" from this site. It splits one row at a time. Can you let me know if it is possible to split more than one row at a time?


Thanks for your time :)


Regards

Koki
 
Hi, koki!


Ah, first of all I should say that the code execution stopping I faced it's an issue of my installation. NARAYANK991 had the kindness to check it out and it run smoothly, with no stops.


Now, your comment. I'm afraid I don't understand. Let us go by parts.

a) you downloaded my file?

b) you checked web retrieval by clicking the cyan button?

c) you loaded your own locations and performed b) again?

d) if a-b-c went Ok, what did you do with the code?

e) if you pasted it in your own workbook, did you defined the two named ranges used?

f) if all previous a-d ok but e) not, please upload your sample file.

g) what's "Macro Code to split text on new line"? paste the code too


Related to g), in my workbook sheet Work is used to retrieve the queried data, and it's retrieved on a line by line basis. The code simply concatenates it using the vbCTLF constant for cell storage purposes only.


Regards!
 
Hi SirJB7,


Sorry to reply late. The problem was caused by another macro, which I sorted out. Your code runs fine. Thanks a lot for the help.


Thanks to NARAYANK991 too for the effort.


Best Regards to you both!!!
 
Hi, koki!

Glad you solved it. Thanks for your feedback and for your kind words too. Welcome back whenever needed or wanted.

Regards!
 
Back
Top