# Microsoft Office Application Help - Excel Help forum > For Other Platforms(Mac, Google Docs, Mobile OS etc) >  >  Retrieve data from Google search and/or Wikipedia with VBA

## cristinik

Hello,

I am trying to automate a search in google with VBA, but I know where to start or even if its possible. I hope someone can give me a hint where to start.

The problem: I have an excel table with city names and their corresponding region, etc. and I would like to include a new column with their area (km2). Since the list is veeeeeery long I would like to somehow automate the search. I realized, that when I google the string "city name & region" the first hyperlink returned is always to wikipedia. In wikipedia, there is always a table (at the right side) with geo-demographic data (population, official languages, etc. and AREA). Even sometime (in my case with Firefox), when I google that string I the list of hyperlinks and additionally a small table (widget?) from wikipedia, with some basic information of the city including the area.

My idea: 
In the case of Firefox, search in the returned HTML code for a string similar to "Area: *** km2". 
In case of IE, access the first hyperlink (normally wikipedia's) and search into this HTML code for the string (similar as above)

I also thought about querying DBpedia, but I think this will be even more complicated.

Of course I dont expect a perfect output, but considering how large is my list, I think it will help.

Sorry for my amateur terminology...I hope anyone can give me any hint on where to start or any other suggestions on how to approach this.

Thanks a lot for your time!

----------


## adyteo

I do not believe it is possible due to the structure of the webpages, even in Wikipedia.
What you can do is create, from pages like: http://en.wikipedia.org/wiki/List_of...cities_by_area, a database with the cities (based on your needed country) and then link your excel file to that database (either excel, CS; etc).
I hope it works.

----------


## cristinik

Thanks a lot. Unfortunately I dont think this will solve my problem... I will keep thinking.

Thanks again!

----------

