The goal is to be able to key in a date and have Excel import historical stock data. Right now, help is needed in setting up the variables in VBA (DIM, Set, etc) and building the URL.
The stock: NKE
Start date is March 19 2007
End date: May 19 2007
The resulting URL is:
http: //finance.yahoo.com/q/hp?s=NKE&a=02&b=19&c=2007&d=04&e=19&f=2007&g=m
Components of the URL
NKE = stock ticker
Start date
02 = March (The months start with Jan = 00 thru Dec = 11)
19 = day
2007 = Year
End Date
04 = May
19 = day
2007 = year
m = provide data by month (d = daily and w = weekly but I and going to stick with retrieving monthly data)
How do I start this code in order to put 3/19/2007 into a single cell and have VBA build the URL with an end date automatically 2 months later?
Bookmarks