spencerwalsh
New Member
- Joined
- Apr 16, 2012
- Messages
- 2
Hello,
I am new to VBA coding and have a question. I would like to pull data from Google Insights for search into excel using a macro.
A similar example would be pulling historical stock data from Yahoo Finance using excel. You would type in the stock ticker, start date, and end date into excel. The macro would then develop the dynamic url, and the pull the .csv file generated from Yahoo Finance.
I would like to do the same with Google Insights for search.
To walk you through the steps, go to:
http://www.google.com/insights/search/
Type in "chicago" in the search bar and hit search.
It generates the URL : http://www.google.com/insights/search/#q=chicago&cmpt=q
I the upper right hand corner there is a CSV file with the historical data of the search volume for the word "chicago". This is the file that I want excel to pull.
I have already figured out the url to automatically download the csv file:
http://www.google.com/insights/search/overviewReport?q=chicago&cmpt=q&content=1&export=2
What VBA code would allow me to just type "chicago" into a cell, run the macro, and have that data automatically pulled into excel? I have previously written the code for the Yahoo Finance example I gave above, but when I try to adjust it to use Google Insights it will not please.
Please let me know if you have any ideas. Your help is greatly appreciated. Thanks!
I am new to VBA coding and have a question. I would like to pull data from Google Insights for search into excel using a macro.
A similar example would be pulling historical stock data from Yahoo Finance using excel. You would type in the stock ticker, start date, and end date into excel. The macro would then develop the dynamic url, and the pull the .csv file generated from Yahoo Finance.
I would like to do the same with Google Insights for search.
To walk you through the steps, go to:
http://www.google.com/insights/search/
Type in "chicago" in the search bar and hit search.
It generates the URL : http://www.google.com/insights/search/#q=chicago&cmpt=q
I the upper right hand corner there is a CSV file with the historical data of the search volume for the word "chicago". This is the file that I want excel to pull.
I have already figured out the url to automatically download the csv file:
http://www.google.com/insights/search/overviewReport?q=chicago&cmpt=q&content=1&export=2
What VBA code would allow me to just type "chicago" into a cell, run the macro, and have that data automatically pulled into excel? I have previously written the code for the Yahoo Finance example I gave above, but when I try to adjust it to use Google Insights it will not please.
Please let me know if you have any ideas. Your help is greatly appreciated. Thanks!