shaolinfunk
asked on
How do I use Data Query from Web to bring in more data?
I have a list of 5 stocks whose stock price I want to put into cells B1 through B5. I know how to import data "From Web" using a web query with this address (I made one for each of the 5 stocks):
http://download.finance.yahoo.com/d/quotes.csv?s=msft&f=p
How do I make it so that if I add more symbols to my excel worksheet I can use autofill on the webqueries and have it automatically bring in the quotes? I want to avoid having to create each and every separate web query for every additional stock I want to add to my worksheet.
http://download.finance.yahoo.com/d/quotes.csv?s=msft&f=p
How do I make it so that if I add more symbols to my excel worksheet I can use autofill on the webqueries and have it automatically bring in the quotes? I want to avoid having to create each and every separate web query for every additional stock I want to add to my worksheet.
ASKER
Uh hi...that's the link you're supposed to put in the address field when using Excel 2007's Data "From Web" feature....
ASKER
I "import" the data at that URL into my spreadsheet...I don't actually download any files....
Please have a look at this file.
In the column B you can place the tag of the stock (LIkE msft)
If there is the CSV in yahoo it will be in the column A
for to change a querry I have to delete the column A and insert a column.
Than all the web querry a delete.
Than the macro will see in column B the TAG and he makes a new web querry for that.
kind regard
Eric
quotes.xls
In the column B you can place the tag of the stock (LIkE msft)
If there is the CSV in yahoo it will be in the column A
for to change a querry I have to delete the column A and insert a column.
Than all the web querry a delete.
Than the macro will see in column B the TAG and he makes a new web querry for that.
kind regard
Eric
quotes.xls
if you change the cell in column B the macro will run automatic.
Kind regard
eric
Kind regard
eric
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Eric,
I typed "http://download.finance.yahoo.com/d/quotes.csv?s=msft&f=p" into colum B1...and in A1 i get the error "N/A,"HTTP:","HTTP:",N/A"
Did you get something different?
I typed "http://download.finance.yahoo.com/d/quotes.csv?s=msft&f=p" into colum B1...and in A1 i get the error "N/A,"HTTP:","HTTP:",N/A"
Did you get something different?
ASKER
my apologies! i see what you mean now...i should type in symbol in column B..give me a few more minutes to make sure i am doing this correctly!
ASKER
Yes this is EXACTLY what I need. THANK YOU VERY MUCH!
ASKER
Eric,
Instead of using Autofill and Worksheet_Change I would like to push a button that will run your macro. I know how to create a button and assign a macro...but i do not know how to alter your code to make it work with the button.
Let's say I have all my stock symbols in column X and I want prices to appear in column Y. Also, since I have headers in X1 ("stocks") and Y1 ("prices") how do I get your macro to NOT delete the entirecolumn?
Instead of using Autofill and Worksheet_Change I would like to push a button that will run your macro. I know how to create a button and assign a macro...but i do not know how to alter your code to make it work with the button.
Let's say I have all my stock symbols in column X and I want prices to appear in column Y. Also, since I have headers in X1 ("stocks") and Y1 ("prices") how do I get your macro to NOT delete the entirecolumn?
ASKER
should i post this as a new questions so you'll get more point?
Please upload the csv to this site using this sites functionality.
I can not open your link..
Kind regards
Eric